code: def build_index_wrapper(self, index_desc: IndexDescriptor):
      if hasattr(index_desc, "index"):
          return
      if index_desc.factory is not None:
          training_vectors = copy(self.training_vectors)
          training_vectors.num_vectors = index_desc.training_size
          index = IndexFromFactory(
              num_threads=self.num_threads,
              d=self.d,
              metric=self.distance_metric,
              database_vectors=self.database_vectors,
              search_params=index_desc.search_params,
              construction_params=index_desc.construction_params,
              factory=index_desc.factory,
              training_vectors=training_vectors,
          )
      else:
          index = IndexFromCodec(
              num_threads=self.num_threads,
              d=self.d,
              metric=self.distance_metric,
              database_vectors=self.database_vectors,
              search_params=index_desc.search_params,
              construction_params=index_desc.construction_params,
              path=index_desc.path,
              bucket=index_desc.bucket,
          )
      index.set_io(self.io)
      index_desc.index = index
  
imports: import logging
  from copy import copy
  from dataclasses import dataclass
  from operator import itemgetter
  from statistics import median, mean
  from typing import Any, Dict, List, Optional
  from .utils import dict_merge
  from .index import Index, IndexFromCodec, IndexFromFactory
  from .descriptors import DatasetDescriptor, IndexDescriptor
  import faiss
  import numpy
  from scipy.optimize import curve_fit
label_desc: Use image node_id 13 for calling the Benchmark obj's underlying member method code with example usage: obj.build_index_wrapper(index_desc) without return types