code: def test_digits_precomputed_two_stage_init():
      model = GraphCutSelection(
          100,
          "precomputed",
          optimizer="two-stage",
          initial_subset=digits_cosine_ranking[:5],
      )
      model.fit(X_digits_cosine_cupy)
      assert_array_equal(model.ranking[:-5], digits_cosine_ranking[5:])
      assert_array_almost_equal(
          model.gains[:-5], digits_cosine_gains[5:], 4
      )
  
imports: import scipy
  import numpy
  from apricot import GraphCutSelection
  from apricot.optimizers import *
  from sklearn.datasets import load_digits
  from sklearn.metrics import pairwise_distances
  from numpy.testing import assert_almost_equal
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 24 for calling a global function with example usage: test_digits_precomputed_two_stage_init() without return types