code: def test_model_compatibility():
      """Test model compatibility, can only be run on CI as others don't
      have the credentials.
  
      """
      path = os.path.dirname(os.path.abspath(__file__))
      path = os.path.join(path, "models")
  
      if not os.path.exists(path):
          zip_path, _ = urllib.request.urlretrieve(
              "https://xgboost-ci-jenkins-artifacts.s3-us-west-2"
              + ".amazonaws.com/xgboost_model_compatibility_test.zip"
          )
          with zipfile.ZipFile(zip_path, "r") as z:
              z.extractall(path)
  
      models = [
          os.path.join(root, f)
          for root, subdir, files in os.walk(path)
          for f in files
          if f != "version"
      ]
      assert models
  
      for path in models:
          name = os.path.basename(path)
          if name.startswith("xgboost-"):
              booster = xgboost.Booster(model_file=path)
              run_booster_check(booster, name)
              # Do full serialization.
              booster = copy.copy(booster)
              run_booster_check(booster, name)
          elif name.startswith("xgboost_scikit"):
              run_scikit_model_check(name, path)
          else:
              assert False
  
file_path: xgboost/tests/python/test_model_compatibility.py
imports: import copy
  import json
  import os
  import urllib.request
  import zipfile
  import generate_models
  import pytest
  import xgboost
  from xgboost import testing
label_desc: Use image node_id 4 for calling a global function with example usage: test_model_compatibility() without return types