Kjetil and I have had a disagreement about whether my answer here should be a comment.
OP's question is essentially one of reading/finding documentation for how xgboost works.*
The full and complete answer to OP's question is that the user's guess is correct: the function works in the way that the user expected. I didn't write more because there's not anything more to say.
Kjetil's contention is that short answers should be comments even if it completely answers the question, citing the Michael Chernick thread. (This is not a straw man argument - it's the content of the comment thread.) I do not believe that contents the Michael Chernick thread apply -- the core contention there is short answers tend to also be incomplete, unhelpful or confusing answers, which are frowned upon.
By contrast, my answer in this thread fully answers the user's question. It took a little digging, but I eventually found a source for the claim (which I knew to be true) that I make in my answer (a fact which may or may not change Kjetil's contention, since it occurred after the comment exchange, but it took a moment to find the relevant doc; regardless, the answer is true even without the doc).
For an example of a short answer which completely answers a question, and was modestly up-voted, see my answer at Closed form for $\mathbb{E}[\ln (1-p)]$, for $p \sim Beta(\alpha, \beta)$ which received no negative feedback, presumably because it completely answers the question.
* Whether that's on-topic is a different matter altogether, but I know from experience that finding xgboost documentation, and even more, documentation for a particular xgboost version, is a bit of a struggle, so I think it's worth providing an answer here.