code: def test_aft_empty_dmatrix():
      X = np.array([]).reshape((0, 2))
      y_lower, y_upper = np.array([]), np.array([])
      dtrain = xgb.DMatrix(X)
      dtrain.set_info(
          label_lower_bound=y_lower, label_upper_bound=y_upper
      )
      bst = xgb.train(
          {"objective": "survival:aft", "tree_method": "hist"},
          dtrain,
          num_boost_round=2,
          evals=[(dtrain, "train")],
      )
  
file_path: xgboost/tests/python/test_survival.py
imports: import json
  import os
  from typing import List, Optional, Tuple, cast
  import numpy
  import pytest
  import xgboost
  from xgboost import testing
label_desc: Use image node_id 4 for calling a global function with example usage: test_aft_empty_dmatrix() without return types