code: def test_add_faiss_index(self):
      import faiss
  
      dset: Dataset = self._create_dummy_dataset()
      dset = dset.map(
          lambda ex, i: {"vecs": i * np.ones(5, dtype=np.float32)},
          with_indices=True,
          keep_in_memory=True,
      )
      dset = dset.add_faiss_index(
          "vecs", batch_size=100, metric_type=faiss.METRIC_INNER_PRODUCT
      )
      scores, examples = dset.get_nearest_examples(
          "vecs", np.ones(5, dtype=np.float32)
      )
      self.assertEqual(examples["filename"][0], "my_name-train_29")
      dset.drop_index("vecs")
  
imports: import os
  import tempfile
  from functools import partial
  from unittest import TestCase
  from unittest.mock import patch
  import numpy
  import pytest
  from datasets.arrow_dataset import Dataset
  from datasets.search import ElasticSearchIndex, FaissIndex, MissingIndex
  from .utils import require_elasticsearch, require_faiss
label_desc: Use image node_id 2 for calling the IndexableDatasetTest obj's underlying member method code with example usage: obj.test_add_faiss_index() without return types