code: def test_get_node_nsamples_by_class(xgb_tree):
      assert np.array_equal(
          xgb_tree.get_node_nsamples_by_class(0), np.array([10, 10])
      )
      assert np.array_equal(
          xgb_tree.get_node_nsamples_by_class(1), np.array([2, 9])
      )
      assert np.array_equal(
          xgb_tree.get_node_nsamples_by_class(2), np.array([8, 1])
      )
      assert np.array_equal(
          xgb_tree.get_node_nsamples_by_class(5), np.array([7, 1])
      )
  
imports: import joblib
  import numpy
  import pytest
  import xgboost
  from dtreeviz.models.xgb_decision_tree import ShadowXGBDTree
label_desc: Use image node_id 11 for calling a global function with example usage: test_get_node_nsamples_by_class(xgb_tree) without return types