code: def check_sorted_correcty_first_two_last_two(
      contributions, python_sorted_desc, python_sorted_asc
  ):
      assert_equals(
          python_sorted_desc[0][0],
          contributions[0, 0],
          "Not correctly sorted",
      )
      assert_equals(
          python_sorted_desc[1][0],
          contributions[0, 2],
          "Not correctly sorted",
      )
      assert_equals(
          python_sorted_asc[0][0],
          contributions[0, 4],
          "Not correctly sorted",
      )
      assert_equals(
          python_sorted_asc[1][0],
          contributions[0, 6],
          "Not correctly sorted",
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/xgboost/pyunit_xgboost_predict_contributions_categorical_sorting.py
imports: from builtins import range
  from collections import OrderedDict
  import sys
  import operator
  from tests import pyunit_utils, assert_equals
  from h2o.estimators.xgboost import *
label_desc: Use image node_id 3 for calling a global function with example usage: check_sorted_correcty_first_two_last_two(contributions, python_sorted_desc, python_sorted_asc) without return types