code: def test_cudf_training_with_sklearn():
      import pandas as pd
      from cudf import DataFrame as df
      from cudf import Series as ss
  
      np.random.seed(1)
      X = pd.DataFrame(np.random.randn(50, 10))
      y = pd.DataFrame((np.random.randn(50) > 0).astype(np.int8))
      weights = np.random.random(50) + 1.0
      cudf_weights = df.from_pandas(pd.DataFrame(weights))
      base_margin = np.random.random(50)
      cudf_base_margin = df.from_pandas(pd.DataFrame(base_margin))
  
      X_cudf = df.from_pandas(X)
      y_cudf = df.from_pandas(y)
      y_cudf_series = ss(data=y.iloc[:, 0])
  
      for y_obj in [y_cudf, y_cudf_series]:
          clf = xgb.XGBClassifier(tree_method="hist", device="cuda:0")
          clf.fit(
              X_cudf,
              y_obj,
              sample_weight=cudf_weights,
              base_margin=cudf_base_margin,
              eval_set=[(X_cudf, y_obj)],
          )
          pred = clf.predict(X_cudf)
          assert np.array_equal(np.unique(pred), np.array([0, 1]))
  
imports: import json
  import numpy
  import pytest
  import xgboost
  from xgboost import testing
  from xgboost.testing.data import run_base_margin_info
label_desc: Use image node_id 5 for calling a global function with example usage: test_cudf_training_with_sklearn() without return types