<s> from pandas . msgpack . _version import version <EOL> from pandas . msgpack . exceptions import * <EOL> from collections import namedtuple <EOL> class ExtType ( namedtuple ( '<STR_LIT>' , '<STR_LIT>' ) ) : <EOL> """<STR_LIT>""" <EOL> def __new__ ( cls , code , data ) : <EOL> if not isinstance ( code , int ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> if not isinstance ( data , bytes ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> if not <NUM_LIT:0> <= code <= <NUM_LIT> : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> return super ( ExtType , cls ) . __new__ ( cls , code , data ) <EOL> import os <EOL> from pandas . msgpack . _packer import Packer <EOL> from pandas . msgpack . _unpacker import unpack , unpackb , Unpacker <EOL> def pack ( o , stream , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> packer = Packer ( ** kwargs ) <EOL> stream . write ( packer . pack ( o ) ) <EOL> def packb ( o , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> return Packer ( ** kwargs ) . pack ( o ) <EOL> load = unpack <EOL> loads = unpackb <EOL> dump = pack <EOL> dumps = packb </s>
