code: def test_initialize_index_custom_hnsw_kwargs(self, num_samples=100):
      embeddings = np.random.rand(num_samples, 5)
      indices_unlabeled = np.random.choice(
          np.arange(num_samples), 10, replace=False
      )
      hnsw_kwargs = dict(
          {
              "space": "cosine",
              "ef_construction": 100,
              "M": 32,
              "ef": 80,
          }
      )
  
      index = SEALS.initialize_index(
          embeddings, indices_unlabeled, hnsw_kwargs
      )
  
      self.assertIsNotNone(index)
      self.assertEqual("cosine", index.space)
      self.assertEqual(100, index.ef_construction)
      self.assertEqual(32, index.M)
      self.assertEqual(80, index.ef)
  
imports: import unittest
  import pytest
  import numpy
  from unittest.mock import Mock, patch
  from numpy.testing import assert_array_equal
  from sklearn.base import clone
  from sklearn.preprocessing import normalize
  from small_text.query_strategies.exceptions import EmptyPoolException
  from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory
  from small_text.query_strategies import BreakingTies, CategoryVectorInconsistencyAndRanking, ContrastiveActiveLearning, DiscriminativeActiveLearning, EmbeddingKMeans, GreedyCoreset, LeastConfidence, LightweightCoreset, SEALS, SubsamplingQueryStrategy
  from tests.unit.small_text.query_strategies.test_strategies import SamplingStrategiesTests, SklearnClassifierWithRandomEmbeddingsAndProba
  from tests.utils.datasets import random_sklearn_dataset, random_matrix_data
  from tests.utils.object_factory import get_initialized_active_learner
label_desc: Use image node_id 8 for calling the SEALSTest obj's underlying member method code with example usage: obj.test_initialize_index_custom_hnsw_kwargs(num_samples) without return types