code: def _choose_optimization_strategy(local_optimization: bool):
      """
      Choose the strategy to optimize the trajectories.
  
      Parameters
      ----------
      local_optimization: boolean to indicate if a local optimization should be
                          used.
  
      Returns
      -------
  
      """
      if local_optimization:
          # Use local method
          strategy = LocalOptimisation()
      else:
          # Use brute force approach
          strategy = BruteForce()
  
      return strategy
  
imports: import numpy
  from typing import Dict
  import numpy.random
  import warnings
  from .local import LocalOptimisation
  from .brute import BruteForce
  from .strategy import SampleMorris
  from SALib.sample import common_args
  from SALib.util import scale_samples, read_param_file, compute_groups_matrix, _define_problem_with_groups, _compute_delta, _check_groups
label_desc: Use image node_id 10 for calling a global function with example usage: _choose_optimization_strategy(local_optimization) and returns: strategy