DRY, this line repeats line 34. Suggestion:
```python
            try:
                out = func(*func_args, **func_kwargs)
            except:
                if handle_exception:
                    out = fail_condition
                else:
                    raise