query.rf.pred.idx: Identify corresponding observations indexes under the terminal nodes for a
random forest model by ranger
Description
The observation indexes (row numbers) constituting the terminal node
associated with each observation are queried using the ranger object
and the training data.
The parameter keep.inbag = TRUE should be applied to call to
ranger.