def maybe_raise(cls, error_type, ignores=None):
        """Raise an :exc:`LibError` unless the ``error_type`` is
        :attr:`ErrorType.OK` or in the ``ignores`` list of error types.
        Internal method.
        """
        ignores = set(ignores or [])
        ignores.add(ErrorType.Ok)
        if error_type not in ignores:
            raise LibError(error_type)
Raise an :exc:`LibError` unless the ``error_type`` is
        :attr:`ErrorType.OK` or in the ``ignores`` list of error types.
        Internal method.