code: def test_multi_target(self) -> None:
      from sklearn.datasets import make_regression
  
      X, y = make_regression(n_samples=1024, n_features=4, n_targets=3)
      ydf = pd.DataFrame({i: y[:, i] for i in range(y.shape[1])})
  
      Xy = xgb.DMatrix(X, ydf)
      assert Xy.num_row() == y.shape[0]
      assert Xy.get_label().size == y.shape[0] * y.shape[1]
      Xy = xgb.QuantileDMatrix(X, ydf)
      assert Xy.num_row() == y.shape[0]
      assert Xy.get_label().size == y.shape[0] * y.shape[1]
  
imports: from typing import Type
  import numpy
  import pytest
  import xgboost
  from xgboost import testing
  from xgboost.core import DataSplitMode
  from xgboost.testing.data import pd_arrow_dtypes, pd_dtypes, run_base_margin_info
label_desc: Use image node_id 2 for calling the TestPandas obj's underlying member method code with example usage: obj.test_multi_target() without return types