code: def test_lambdarank():
      fd = FileLoader(EXAMPLES_DIR / "lambdarank", "rank")
      X_train, y_train, _ = fd.load_dataset(".train", is_sparse=True)
      X_test, _, X_test_fn = fd.load_dataset(".test", is_sparse=True)
      group_train = fd.load_field(".train.query")
      lgb_train = lgb.Dataset(X_train, y_train, group=group_train)
      params = dict(fd.params)
      params["force_col_wise"] = True
      gbm = lgb.LGBMRanker(**params)
      gbm.fit(X_train, y_train, group=group_train)
      sk_pred = gbm.predict(X_test)
      fd.train_predict_check(lgb_train, X_test, X_test_fn, sk_pred)
      fd.file_load_check(lgb_train, ".train")
  
file_path: LightGBM/tests/python_package_test/test_consistency.py
imports: from pathlib import Path
  import numpy
  from sklearn.datasets import load_svmlight_file
  import lightgbm
label_desc: Use image node_id 5 for calling a global function with example usage: test_lambdarank() without return types