code: def test_eta_decay(self):
      param = {
          "max_depth": 2,
          "eta": 1,
          "silent": 1,
          "objective": "binary:logistic",
      }
      watchlist = [(dtest, "eval"), (dtrain, "train")]
      num_round = 2
      # learning_rates as a list
      bst = xgb.train(
          param, dtrain, num_round, watchlist, learning_rates=[0.4, 0.3]
      )
      assert isinstance(bst, xgb.core.Booster)
  
      # learning_rates as a customized decay function
      def eta_decay(ithround, num_boost_round):
          return num_boost_round / ithround
  
      bst = xgb.train(
          param, dtrain, num_round, watchlist, learning_rates=eta_decay
      )
      assert isinstance(bst, xgb.core.Booster)
  
file_path: turicreate/src/external/xgboost/tests/python/test_models.py
imports: import numpy
  import xgboost
  import unittest
label_desc: Use image node_id 2 for calling the TestModels obj's underlying member method code with example usage: obj.test_eta_decay() and returns: unknown