code: def _validate_sequential_inputs(
      opt_inputs: OptimizeAcqfInputs,
  ) -> None:
      # validate that linear constraints across the q-dim and
      # self.sequential are not present together
      if opt_inputs.inequality_constraints is not None:
          for constraint in opt_inputs.inequality_constraints:
              if len(constraint[0].shape) > 1:
                  raise UnsupportedError(
                      "Linear inequality constraints across the q-dimension are not "
                      "supported for sequential optimization."
                  )
      if opt_inputs.equality_constraints is not None:
          for constraint in opt_inputs.equality_constraints:
              if len(constraint[0].shape) > 1:
                  raise UnsupportedError(
                      "Linear equality constraints across the q-dimension are not "
                      "supported for sequential optimization."
                  )
  
      # TODO: Validate constraints if provided:
      # https://github.com/pytorch/botorch/pull/1231
      if opt_inputs.batch_initial_conditions is not None:
          raise UnsupportedError(
              "`batch_initial_conditions` is not supported for sequential "
              "optimization. Either avoid specifying "
              "`batch_initial_conditions` to use the custom initializer or "
              "use the `ic_generator` kwarg to generate initial conditions "
              "for the case of nonlinear inequality constraints."
          )
  
      if not opt_inputs.return_best_only:
          raise NotImplementedError(
              "`return_best_only=False` only supported for joint optimization."
          )
      if isinstance(
          opt_inputs.acq_function, OneShotAcquisitionFunction
      ):
          raise NotImplementedError(
              "sequential optimization currently not supported for one-shot "
              "acquisition functions. Must have `sequential=False`."
          )
  
imports: from __future__ import annotations
  import dataclasses
  import warnings
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  from botorch.acquisition.acquisition import AcquisitionFunction, OneShotAcquisitionFunction
  from botorch.acquisition.knowledge_gradient import qKnowledgeGradient
  from botorch.acquisition.multi_objective.hypervolume_knowledge_gradient import qHypervolumeKnowledgeGradient
  from botorch.exceptions import InputDataError, UnsupportedError
  from botorch.exceptions.warnings import OptimizationWarning
  from botorch.generation.gen import gen_candidates_scipy, TGenCandidates
  from botorch.logging import logger
  from botorch.optim.initializers import gen_batch_initial_conditions, gen_one_shot_hvkg_initial_conditions, gen_one_shot_kg_initial_conditions, TGenInitialConditions
  from botorch.optim.stopping import ExpMAStoppingCriterion
  from botorch.optim.utils import _filter_kwargs
  from torch import Tensor
label_desc: Use image node_id 3 for calling a global function with example usage: _validate_sequential_inputs(opt_inputs) without return types