parameters: (
      evaluate_func: EVALUATE_FUNC,
      optimization_setting: OptimizationSetting,
      key_func: KEY_FUNC,
      max_workers: int = None,
      output: OUTPUT_FUNC = print
  )
docstring: Run brutal force optimization
docstring_summary: Run brutal force optimization
docstring_tokens: Run brutal force optimization
function: def run_bf_optimization(
      evaluate_func: EVALUATE_FUNC,
      optimization_setting: OptimizationSetting,
      key_func: KEY_FUNC,
      max_workers: int = None,
      output: OUTPUT_FUNC = print
  ) -> List[Tuple]:
      """Run brutal force optimization"""
      settings: List[Dict] = optimization_setting.generate_settings()
  
      output(f"开始执行穷举算法优化")
      output(f"参数优化空间：{len(settings)}")
  
      start: int = perf_counter()
  
      with ProcessPoolExecutor(
          max_workers,
          mp_context=get_context("spawn")
      ) as executor:
          results: List[Tuple] = list(executor.map(evaluate_func, settings))
          results.sort(reverse=True, key=key_func)
  
          end: int = perf_counter()
          cost: int = int((end - start))
          output(f"穷举算法优化完成，耗时{cost}秒")
  
          return results
function_tokens: def run_bf_optimization ( evaluate_func : EVALUATE_FUNC , optimization_setting : OptimizationSetting , key_func : KEY_FUNC , max_workers : int = None , output : OUTPUT_FUNC = print ) -> List [ Tuple ] : settings : List [ Dict ] = optimization_setting . generate_settings ( ) output ( f"开始执行穷举算法优化") output ( f"参数优化空间：{len(settings)}") start : int = perf_counter ( ) with ProcessPoolExecutor ( max_workers , mp_context = get_context ( "spawn" ) ) as executor : results : List [ Tuple ] = list ( executor . map ( evaluate_func , settings ) ) results . sort ( reverse = True , key = key_func ) end : int = perf_counter ( ) cost : int = int ( ( end - start ) ) output ( f"穷举算法优化完成，耗时{cost}秒") return results