code: def _trials_xy_for_prev_trials(prev_trials, names, objective_negate):
      assert names
      x0 = []
      y0 = []
      for flags, y_scalars in prev_trials:
          assert len(y_scalars) == 1
          y = y_scalars[0]
          if y is None:
              continue
          x0.append([flags.get(name) for name in names])
          y0.append(objective_negate * y)
      if not x0:
          return None, None
      return x0, y0
  
imports: import logging
  import os
  import typing
  import warnings
  from guild import _skopt
  from guild import batch_util
  from guild import flag_util
  from guild import op_util
  from guild import query
label_desc: Use image node_id 19 for calling a global function with example usage: _trials_xy_for_prev_trials(prev_trials, names, objective_negate) and returns: x0,  y0, None,  None