code: def mo_lin_asy_ts(gps, anc_data):
      """Returns a recommendation via TS with Linear Scalarization in the
      asynchronous setting for MOO"""
      anc_data = copy(anc_data)
      # Always use a random optimiser with a vectorised sampler for TS.
      if anc_data.acq_opt_method != "rand":
          anc_data.acq_opt_method = "rand"
          anc_data.max_evals = 4 * anc_data.max_evals
      gp_samples = []
      for gp in gps:
          gp_sample = get_gp_sampler_for_parallel_strategy(gp, anc_data)
          gp_samples.append(gp_sample)
  
      def acquisition(x):
          """Computes the scalar acquisition function for the given weight
          vector and the reference point.
          """
          s = 0.0
          for gp_sample, weight in zip(
              gp_samples, anc_data.obj_weights
          ):
              s += gp_sample(x) * weight
          return s
  
      return maximise_acquisition(
          acquisition, anc_data, vectorised=True
      )
  
file_path: dragonfly/dragonfly/opt/multiobjective_gpb_acquisitions.py
imports: from __future__ import division
  from argparse import Namespace
  from copy import copy
  import numpy
  from .gpb_acquisitions import maximise_acquisition
  from .gpb_acquisitions import get_gp_sampler_for_parallel_strategy
label_desc: Use image node_id 1 for calling a global function with example usage: mo_lin_asy_ts(gps, anc_data) and returns: maximise_acquisition, s