def try_rpc(self, func, *args, **kwargs):
    if self.expect_disabled:
        assert_raises_rpc_error((- 4), 'Rescan is disabled in pruned mode', func, *args, **kwargs)
    else:
        return func(*args, **kwargs)
def try_rpc(self, func, *args, **kwargs):
    if self.expect_disabled:
        assert_raises_rpc_error((- 4), 'Rescan is disabled in pruned mode', func, *args, **kwargs)
    else:
        return func(*args, **kwargs)