code: def setUpClass(self):
      index = HnswIndex(self.dim)
      for i in xrange(self.data_num):
          v = [random.gauss(0, 1) for z in xrange(self.dim)]
          index.add_data(v)
      index.build(n_threads=12)
      index.save(self.model_fname)
  
imports: import unittest
  import random
  import os
  from n2 import HnswIndex
label_desc: Use image node_id 1 for calling the BasicTest obj's underlying member method code with example usage: obj.setUpClass() without return types