def lbmethod(func):
    @wraps(func)
    def wrapper(self, *args, **kwargs):
        if not isinstance(self._lb, f5.Lb):
            raise RuntimeError((type(self.lb).__name__) % 'lb must be a valid lb object, not %s')

        return func(self, *args, **kwargs)

    return wrapper


# Set active folder to writable one if it is not
dataset/ETHPy150Open tdevelioglu/python-f5/f5/util.py/lbmethod/swapped operands of `%`