code: def optimize(self):
          
          # load benchmarks results
          with open(LIBRARIES_FILE, 'r') as f:
              libs_data = json.load(f)
          # optimize
          for alg, libs_names in libs_data.items():
              libs = self.get_libs(alg)
              if not libs:
                  continue
              # drop slow libs
              self.libs[alg] = [lib for lib in libs if [lib.module_name, lib.func_name] in libs_names]
              # sort libs by speed
              self.libs[alg].sort(key=lambda lib: libs_names.index([lib.module_name, lib.func_name]))
docs: Sort algorithm implementations by speed.