Random forest classification criteria

Hi, I need to implement the inference of the RandomForestClassifier of sklearn in C language following the equation illustred in 1.10. Decision Trees — scikit-learn 1.2.2 documentation.
Could you explain me how to get the y and the nm in python? Is the equation of the link the right equation to be considered?

Your question seems to be unrelated to PyTorch so you might want to post it in a scikit-learn - specific discussion board.