code: def __init__(self, vector_size, dataset, index_initialized=False):
      self.vector_size = vector_size
      self.dataset = dataset
      self._index_initialized = index_initialized
      self._check_dataset_format(with_index=index_initialized)
      dataset.set_format(
          "numpy",
          columns=["embeddings"],
          output_all_columns=True,
          dtype="float32",
      )
  
imports: import os
  import pickle
  import time
  from typing import Iterable, List, Optional, Tuple
  import numpy
  from ...tokenization_utils import PreTrainedTokenizer
  from ...tokenization_utils_base import BatchEncoding
  from ...utils import cached_file, is_datasets_available, is_faiss_available, logging, requires_backends, strtobool
  from .configuration_rag import RagConfig
  from .tokenization_rag import RagTokenizer
label_desc: Use image node_id 1 to create a new HFIndexBase object from inherited base classes: Index with example: obj = HFIndexBase(vector_size, dataset, index_initialized)