code: def _iter_seq_trials(
      proto_flag_vals,
      objective_negate,
      max_trials,
      random_state,
      random_starts,
      prev_trials_cb,
      suggest_x_cb,
      suggest_x_opts,
  ):
      names, dims, initial_x = _flag_dims_for_search(proto_flag_vals)
      runs_count = 0
      for _trial in range(max_trials):
          prev_trials = prev_trials_cb()
          x0, y0 = _trials_xy_for_prev_trials(
              prev_trials, names, objective_negate
          )
          is_random_start = _is_random_start(
              x0, runs_count, random_starts
          )
          suggested_x, random_state = _suggest_x(
              suggest_x_cb,
              dims,
              x0,
              y0,
              is_random_start,
              random_state,
              suggest_x_opts,
          )
          if runs_count == 0 and suggested_x:
              _apply_initial_x(initial_x, suggested_x)
          trial_flag_vals = _trial_flags_for_x(
              suggested_x, names, proto_flag_vals
          )
          yield trial_flag_vals, is_random_start, prev_trials, x0
          runs_count += 1
  
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 16 for calling a global function with example usage: _iter_seq_trials(proto_flag_vals, objective_negate, max_trials, random_state, random_starts, prev_trials_cb, suggest_x_cb, suggest_x_opts) without return types