code: def load_approximate_nearest_neighbours_index(
      linker_paths: LinkerPaths,
      ef_search: int = 200,
  ) -> FloatIndex:
      """
      Load an approximate nearest neighbours index from disk.
  
      Parameters
      ----------
      linker_paths: LinkerPaths, required.
          Contains the paths to the data required for the entity linker.
      ef_search: int, optional (default = 200)
          Controls speed performance at query time. Max value is 2000,
          but reducing to around ~100 will increase query speed by an order
          of magnitude for a small performance hit.
      """
      concept_alias_tfidfs = scipy.sparse.load_npz(
          cached_path(linker_paths.tfidf_vectors)
      ).astype(numpy.float32)
      ann_index = nmslib.init(
          method="hnsw",
          space="cosinesimil_sparse",
          data_type=nmslib.DataType.SPARSE_VECTOR,
      )
      ann_index.addDataPointBatch(concept_alias_tfidfs)
      ann_index.loadIndex(cached_path(linker_paths.ann_index))
      query_time_params = {"efSearch": ef_search}
      ann_index.setQueryTimeParams(query_time_params)
  
      return ann_index
  
imports: from typing import Optional, List, Dict, Tuple, NamedTuple, Type
  import json
  import datetime
  from collections import defaultdict
  import scipy
  import numpy
  import joblib
  from sklearn.feature_extraction.text import TfidfVectorizer
  import nmslib
  from nmslib.dist import FloatIndex
  from scispacy.file_cache import cached_path
  from scispacy.linking_utils import KnowledgeBase, UmlsKnowledgeBase, Mesh, GeneOntology, RxNorm, HumanPhenotypeOntology
label_desc: Use image node_id 1 for calling a global function with example usage: load_approximate_nearest_neighbours_index(linker_paths, ef_search) and returns: ann_index