def _init(self):
        try:
            lib = Library(self.library_path)
        except __HOLE__ as exc:
            raise errors.LibraryError.from_exception(exc, self.library_path)

        self.lib = lib

        # Set the argtypes, restype and errcheck for each function
        # of the visa library. Additionally store in `_functions` the
        # name of the functions.
        functions.set_signatures(self.lib, errcheck=self._return_handler)

        logger.debug('Library signatures: %d ok, %d failed',
                     len(getattr(self.lib, '_functions', [])),
                     len(getattr(self.lib, '_functions_failed', [])))

        # Set the library functions as attributes of the object.
        for method_name in getattr(self.lib, '_functions', []):
            setattr(self, method_name, getattr(self.lib, method_name))
dataset/ETHPy150Open hgrecco/pyvisa/pyvisa/ctwrapper/highlevel.py/NIVisaLibrary._init