code: def test_local_predict_tensor(setup):
      dtrain = MarsDMatrix(X, y)
      booster = train({}, dtrain, num_boost_round=2)
      assert isinstance(booster, Booster)
  
      prediction = predict(booster, X)
      assert isinstance(prediction.to_numpy(), np.ndarray)
  
      prediction = predict(booster, X_sparse)
      assert isinstance(prediction.to_numpy(), np.ndarray)
  
      prediction = predict(booster, dtrain)
      assert isinstance(prediction.fetch(), np.ndarray)
  
      with pytest.raises(TypeError):
          predict(None, X)
  
file_path: mars/mars/learn/contrib/xgboost/tests/test_predict.py
imports: import numpy
  import pandas
  import pytest
  from .....None import tensor
  from .....None import dataframe
  from ..None import MarsDMatrix, train, predict
label_desc: Use image node_id 1 for calling a global function with example usage: test_local_predict_tensor(setup) without return types