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