def METHOD_NAME(self):
    dataset = self._make_image_dataset()
    query_id = dataset.first().id
    view1 = dataset.sort_by_similarity(query_id)
    values1 = view1.values("id")
    view2 = dataset.sort_by_similarity(query_id, reverse=True)
    values2 = view2.values("id")
    self.assertListEqual(values2, values1[::-1])
    view3 = dataset.sort_by_similarity(query_id, k=4)
    values3 = view3.values("id")
    self.assertListEqual(values3, values1[:4])
    view4 = dataset.sort_by_similarity(query_id, brain_key="img_sim")
    values4 = view4.values("id")
    self.assertListEqual(values4, values1)
    view5 = view4.limit(2)
    values5 = view5.values("id")
    self.assertListEqual(values5, values1[:2])
    view5.reload()
    values5 = view5.values("id")
    self.assertListEqual(values5, values1[:2])