code: def test_monotone_constraints_for_exact_tree_method(self):
      # first check monotonicity for the 'exact' tree method
      params_for_constrained_exact_method = {
          "tree_method": "exact",
          "verbosity": 1,
          "monotone_constraints": "(1, -1)",
      }
      constrained_exact_method = xgb.train(
          params_for_constrained_exact_method, training_dset
      )
      assert is_correctly_constrained(constrained_exact_method)
  
file_path: xgboost/tests/python/test_monotone_constraints.py
imports: import numpy
  import pytest
  import xgboost
  from xgboost import testing
label_desc: Use image node_id 1 for calling the TestMonotoneConstraints obj's underlying member method code with example usage: obj.test_monotone_constraints_for_exact_tree_method() without return types