code: def test_deprecate_position_arg():
      from sklearn.datasets import load_digits
  
      X, y = load_digits(return_X_y=True, n_class=2)
      w = y
      with pytest.warns(FutureWarning):
          xgb.XGBRegressor(3, learning_rate=0.1)
      model = xgb.XGBRegressor(n_estimators=1)
      with pytest.warns(FutureWarning):
          model.fit(X, y, w)
  
      with pytest.warns(FutureWarning):
          xgb.XGBClassifier(1)
      model = xgb.XGBClassifier(n_estimators=1)
      with pytest.warns(FutureWarning):
          model.fit(X, y, w)
  
      with pytest.warns(FutureWarning):
          xgb.XGBRanker("rank:ndcg", learning_rate=0.1)
      model = xgb.XGBRanker(n_estimators=1)
      group = np.repeat(1, X.shape[0])
      with pytest.warns(FutureWarning):
          model.fit(X, y, group)
  
      with pytest.warns(FutureWarning):
          xgb.XGBRFRegressor(1, learning_rate=0.1)
      model = xgb.XGBRFRegressor(n_estimators=1)
      with pytest.warns(FutureWarning):
          model.fit(X, y, w)
  
      model = xgb.XGBRFClassifier(n_estimators=1)
      with pytest.warns(FutureWarning):
          model.fit(X, y, w)
  
imports: import json
  import os
  import pickle
  import random
  import tempfile
  import warnings
  from typing import Callable, Optional
  import numpy
  import pytest
  from sklearn.utils.estimator_checks import parametrize_with_checks
  import xgboost
  from xgboost import testing
  from xgboost.testing.ranking import run_ranking_categorical, run_ranking_qid_df
  from xgboost.testing.shared import get_feature_weights, validate_data_initialization
  from xgboost.testing.updater import get_basescore
label_desc: Use image node_id 39 for calling a global function with example usage: test_deprecate_position_arg() without return types