code: def get_func(name, argtypes=None, restype=c_int, lib=libNLPIR):
      
      logger.debug("Getting NLPIR API function: 'name': '{}', 'argtypes': '{}',"
                   " 'restype': '{}'.".format(name, argtypes, restype))
      func = getattr(lib, name)
      if argtypes is not None:
          func.argtypes = argtypes
      if restype is not c_int:
          func.restype = restype
      logger.debug("NLPIR API function '{}' retrieved.".format(name))
      return func
docs: Retrieves the corresponding NLPIR function.
  
      :param str name: The name of the NLPIR function to get.
      :param list argtypes: A list of :mod:`ctypes` data types that correspond
          to the function's argument types.
      :param restype: A :mod:`ctypes` data type that corresponds to the
          function's return type (only needed if the return type isn't
          :class:`ctypes.c_int`).
      :param lib: A :class:`ctypes.CDLL` instance for the NLPIR API library where
          the function will be retrieved from (defaults to :data:`libNLPIR`).
      :returns: The exported function. It can be called like any other Python
          callable.