code: def test_runnable(self):
      # First index some random vectors
      matrix = numpy.zeros((1000, 200))
      for i in xrange(1000):
          v = numpy.random.randn(200)
          matrix[i] = v
          self.engine.store_vector(v)
          self.engine_perm.store_vector(v)
  
      # Then update permuted index
      self.permutations.build_permuted_index()
  
      # Do random query on engine with permutations meta-hash
      query = numpy.random.randn(200)
      results = self.engine_perm.neighbours(query)
      permuted_dists = [x[2] for x in results]
  
      # Do random query on engine without permutations meta-hash (distances should be larger):'
      results = self.engine.neighbours(query)
      dists = [x[2] for x in results]
  
      self.assertLess(permuted_dists[0], dists[0])
  
file_path: NearPy/tests/permutation_tests.py
imports: import numpy
  import unittest
  import logging
  from nearpy import Engine
  from nearpy.distances import CosineDistance
  from nearpy.hashes import HashPermutations
  from nearpy.hashes import RandomBinaryProjections
  from past.builtins import xrange
label_desc: Use image node_id 2 for calling the TestPermutation obj's underlying member method code with example usage: obj.test_runnable() without return types