code: def test_hist_degenerate_case(self):
      # Test a degenerate case where the quantile sketcher won't return any
      # quantile points for a particular feature (the second feature in
      # this example). Source: https://github.com/dmlc/xgboost/issues/2943
      nan = np.nan
      param = {"missing": nan, "tree_method": "hist"}
      model = xgb.XGBRegressor(**param)
      X = np.array(
          [
              [6.18827160e05, 1.73000000e02],
              [6.37345679e05, nan],
              [6.38888889e05, nan],
              [6.28086420e05, nan],
          ]
      )
      y = [1000000.0, 0.0, 0.0, 500000.0]
      w = [0, 0, 1, 0]
      model.fit(X, y, sample_weight=w)
  
imports: import json
  from string import ascii_lowercase
  from typing import Any, Dict
  import numpy
  import pytest
  from hypothesis import given, note, settings, strategies
  import xgboost
  from xgboost import testing
  from xgboost.testing.params import cat_parameter_strategy, exact_parameter_strategy, hist_cache_strategy, hist_parameter_strategy
  from xgboost.testing.updater import check_categorical_missing, check_categorical_ohe, check_get_quantile_cut, check_init_estimation, check_quantile_loss, train_result
label_desc: Use image node_id 6 for calling the TestTreeMethod obj's underlying member method code with example usage: obj.test_hist_degenerate_case() without return types