code: def hash_vector(self, v, querying=False):
          
  
          bucket_keys = []
  
          if querying:
              # If we are querying, use the bucket key map
              for lshash in self.child_hashes:
                  # Get regular bucket keys from hash
                  for bucket_key in lshash.hash_vector(v, querying):
                      prefixed_key = lshash.hash_name+'_'+bucket_key
                      # Get entries from map (bucket keys with hamming distance of 1)
                      if prefixed_key in self.bucket_key_map:
                          bucket_keys.extend(self.bucket_key_map[prefixed_key].keys())
          else:
              # If we are indexing (storing) just use child hashes without permuted index
              for lshash in self.child_hashes:
                  # Get regular bucket keys from hash
                  for bucket_key in lshash.hash_vector(v, querying):
                      # Get permuted keys
                      perm_keys = self.permuted_keys(bucket_key)
                      # Put extact hit key into list
                      perm_keys.append(bucket_key)
  
                      # Append key for storage (not the permutations)
                      bucket_keys.append(lshash.hash_name+'_'+bucket_key)
  
                      # For every permutation register all the variants
                      for perm_key in perm_keys:
                          prefixed_key = lshash.hash_name+'_'+perm_key
  
                          # Make sure dictionary exists
                          if not prefixed_key in self.bucket_key_map:
                              self.bucket_key_map[prefixed_key] = {}
  
                          for variant in perm_keys:
                              prefixed_variant = lshash.hash_name+'_'+variant
                              self.bucket_key_map[prefixed_key][prefixed_variant] = 1
  
          # Return all the bucket keys
          return bucket_keys
docs: Hashes the vector and returns the bucket key as string.