code: def test_similarity_api(self):
      dataset = self._make_image_dataset()
  
      results = dataset.load_brain_results("img_sim")
  
      self.assertEqual(results.key, "img_sim")
  
      info = dataset.get_brain_info("img_sim")
      self.assertEqual(info.key, "img_sim")
  
      brain_keys = dataset.list_brain_runs()
      self.assertEqual(brain_keys, ["img_sim"])
  
      good_keys = dataset.list_brain_runs(type=BrainMethod)
      self.assertEqual(good_keys, ["img_sim"])
  
      bad_keys = dataset.list_brain_runs(type=EvaluationMethod)
      self.assertEqual(bad_keys, [])
  
      dataset.rename_brain_run("img_sim", "still_img_sim")
  
      also_results = dataset.load_brain_results(
          "still_img_sim", cache=False
      )
  
      self.assertFalse(results is also_results)
      self.assertEqual(results.key, "still_img_sim")
      self.assertEqual(also_results.key, "still_img_sim")
  
      info = dataset.get_brain_info("still_img_sim")
      self.assertEqual(info.key, "still_img_sim")
  
      brain_keys = dataset.list_brain_runs()
      self.assertEqual(brain_keys, ["still_img_sim"])
  
      good_keys = dataset.list_brain_runs(type=BrainMethod)
      self.assertEqual(good_keys, ["still_img_sim"])
  
      bad_keys = dataset.list_brain_runs(type=EvaluationMethod)
      self.assertEqual(bad_keys, [])
  
      results.save()
  
      self.assertEqual(dataset.list_brain_runs(), ["still_img_sim"])
  
      dataset.delete_brain_runs()
      self.assertEqual(dataset.list_brain_runs(), [])
      self.assertIsNone(results.key)
  
file_path: fiftyone/tests/unittests/similarity_tests.py
imports: import unittest
  import numpy
  import fiftyone
  import fiftyone.brain
  from fiftyone.core.brain import BrainMethod
  from fiftyone.core.evaluation import EvaluationMethod
  from decorators import drop_datasets
label_desc: Use image node_id 2 for calling the SimilarityTests obj's underlying member method code with example usage: obj.test_similarity_api() without return types