code: def test_get_most_recent_inds():
      test_data = []
      most_recent_data = []
      for ind in range(300):
          k = np.random.randint(1, 6)
          for _ind in range(k):
              test_data.append({"_id": ind, "version": _ind})
          most_recent_data.append({"_id": ind, "version": _ind})
      rng = np.random.default_rng(0)
      p = rng.permutation(len(test_data))
      test_data_rearranged = [test_data[_p] for _p in p]
      rind = get_most_recent_inds(test_data_rearranged)
      test_data_rearranged_most_recent = [
          test_data_rearranged[idx] for idx in rind
      ]
      assert all(
          [
              t in most_recent_data
              for t in test_data_rearranged_most_recent
          ]
      )
      assert len(test_data_rearranged_most_recent) == len(
          most_recent_data
      )
  
      test_data = [{"_id": 0, "version": 1}]
  
      assert get_most_recent_inds(test_data).tolist() == [0]
  
      test_data = [{"_id": 0, "version": 1}, {"_id": 0, "version": 2}]
      assert get_most_recent_inds(test_data).tolist() == [1]
  
      test_data = [
          {"_id": 0, "version": 1},
          {"_id": 0, "version": 2},
          {"_id": 1, "version": 1},
      ]
  
      assert get_most_recent_inds(test_data).tolist() == [1, 2]
  
      test_data = [
          {"_id": -1, "version": 1},
          {"_id": 0, "version": 1},
          {"_id": 0, "version": 2},
          {"_id": 1, "version": 1},
      ]
  
      assert get_most_recent_inds(test_data).tolist() == [0, 2, 3]
  
      test_data = [
          {"_id": -1, "version": 1},
          {"_id": 0, "version": 1},
          {"_id": 0, "version": 2},
          {"_id": 0, "version": 2},
      ]
  
      assert get_most_recent_inds(test_data).tolist() == [0, 3]
  
file_path: hyperopt/hyperopt/tests/unit/test_utils.py
imports: import numpy
  from nose.tools import raises, eq_
  import shutil
  import os
  from hyperopt.utils import fast_isin
  from hyperopt.utils import get_most_recent_inds
  from hyperopt.utils import temp_dir, working_dir, get_closest_dir, path_split_all
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_most_recent_inds() without return types