See https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/forest.py#L349 for an example