code: def filter_vectors(self, input_list):
          
          try:
              # Return filtered (vector, data, distance )tuple list. Will fail
              # if input is list of (vector, data) tuples.
              sorted_list = sorted(input_list, key=lambda x: x[2])
              return sorted_list[:self.N]
          except:
              # Otherwise just return input list
              return input_list
docs: Returns subset of specified input list.