code: def _argparse_kg(
      acqf: qKnowledgeGradient,
      q: int,
      bounds: torch.Tensor,
      num_restarts: int = 20,
      raw_samples: int = 1024,
      frac_random: float = 0.1,
      optimizer_options: Optional[Dict[str, Any]] = None,
      **kwargs: Any,
  ) -> Dict[str, Any]:
      optimizer_options = optimizer_options or {}
      base_options = _argparse_base(
          acqf,
          num_restarts=num_restarts,
          raw_samples=raw_samples,
          optimizer_options=optimizer_options,
          **kwargs,
      )
  
      initial_conditions = gen_one_shot_kg_initial_conditions(
          acq_function=acqf,
          bounds=bounds,
          q=q,
          num_restarts=num_restarts,
          raw_samples=raw_samples,
          options={
              Keys.FRAC_RANDOM: frac_random,
              Keys.NUM_INNER_RESTARTS: num_restarts,
              Keys.RAW_INNER_SAMPLES: raw_samples,
          },
      )
  
      return {
          **base_options,
          Keys.BATCH_INIT_CONDITIONS: initial_conditions,
      }
  
file_path: Ax/ax/models/torch/botorch_modular/optimizer_argparse.py
imports: from __future__ import annotations
  from typing import Any, Dict, Optional, Type, TypeVar, Union
  import torch
  from ax.utils.common.constants import Keys
  from ax.utils.common.typeutils import _argparse_type_encoder
  from botorch.acquisition.acquisition import AcquisitionFunction
  from botorch.acquisition.knowledge_gradient import qKnowledgeGradient
  from botorch.acquisition.max_value_entropy_search import qMaxValueEntropy
  from botorch.acquisition.multi_objective.monte_carlo import qExpectedHypervolumeImprovement
  from botorch.optim.initializers import gen_one_shot_kg_initial_conditions
  from botorch.utils.dispatcher import Dispatcher
label_desc: Use image node_id 3 for calling a global function with example usage: _argparse_kg(acqf, q, bounds, num_restarts, raw_samples, frac_random, optimizer_options) and returns: dict