Apparently this is not tested as it would raise a formatting exception: it should be: 

```python
            raise ValueError(("max_leaf_nodes {0} must be either smaller than 0 or "
                             "larger than 1").format(max_leaf_nodes))
```

But better add a test first to check that this is actually a fix.