def _load_cdll(name):
<EOL>libname = _get_lib_name(name)<EOL>libdir = os.path.join(os.path.dirname(__file__), '<STR_LIT>')<EOL>libpath = os.path.join(libdir, libname)<EOL>static_fftw = os.path.join(libdir, '<STR_LIT>')<EOL>static_fftwf = os.path.join(libdir, '<STR_LIT>')<EOL>try:<EOL><INDENT>fftw_lib = ctypes.CDLL(str(static_fftw))  <EOL>fftwf_lib = ctypes.CDLL(str(static_fftwf))  <EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>cdll = ctypes.CDLL(str(libpath))<EOL><DEDENT>except Exception as e:<EOL><INDENT>msg = '<STR_LIT>' % (libname, str(e))<EOL>raise ImportError(msg)<EOL><DEDENT>return cdll<EOL>
Helper function to load a shared library built during installation
with ctypes.

:type name: str
:param name: Name of the library to load (e.g. 'mseed').
:rtype: :class:`ctypes.CDLL`