code: def test_sort_features_by_priority_all(sample_features):
      # test the ordering of feature importance computation when feature impotance computation comes from mix of current and previous fit models,
      # and some feature are unevaluated
      length = len(sample_features)
      using_prev_fit_fi = set(sample_features[: length // 3])
      evaluated_rows, unevaluated_rows = evaluated_fi_df_template(
          sample_features[: length // 2]
      ), unevaluated_fi_df_template(sample_features[length // 2 :])
      prev_importance_df = pd.concat([evaluated_rows, unevaluated_rows])
      sorted_features = sort_features_by_priority(
          features=sample_features,
          prev_importance_df=prev_importance_df,
          using_prev_fit_fi=using_prev_fit_fi,
      )
      unevaluated_features = unevaluated_rows.index.tolist()
      sorted_prev_fit_features = (
          evaluated_rows[
              (
                  ~evaluated_rows.index.isin(
                      sample_features[length // 2 :]
                  )
              )
              & (evaluated_rows.index.isin(using_prev_fit_fi))
          ]
          .sort_values("importance")
          .index.tolist()
      )
      sorted_curr_fit_features = (
          evaluated_rows[
              (
                  ~evaluated_rows.index.isin(
                      sample_features[length // 2 :]
                  )
              )
              & (~evaluated_rows.index.isin(using_prev_fit_fi))
          ]
          .sort_values("importance")
          .index.tolist()
      )
      expected_features = (
          unevaluated_features
          + sorted_prev_fit_features
          + sorted_curr_fit_features
      )
      assert sorted_features == expected_features
  
file_path: autogluon/core/tests/unittests/test_feature_selection.py
imports: import numpy
  import pandas
  import pytest
  from numpy.core.fromnumeric import sort
  from autogluon.core.utils.feature_selection import *
  from autogluon.core.utils.utils import unevaluated_fi_df_template
label_desc: Use image node_id 13 for calling a global function with example usage: test_sort_features_by_priority_all(sample_features) without return types