code: def _input_transform_argparse_normalize(
      input_transform_class: Type[Normalize],
      dataset: SupervisedDataset,
      search_space_digest: SearchSpaceDigest,
      input_transform_options: Optional[Dict[str, Any]] = None,
      torch_device: Optional[torch.device] = None,
      torch_dtype: Optional[torch.dtype] = None,
  ) -> Dict[str, Any]:
      """
      Extract the base input transform kwargs form the given arguments.
      NOTE: This input constructor doesn't support the case when there are
      task features that are not part of search space digest. In that case,
      the bounds need to be specified manually as a part of input_transform_options.
  
      Args:
          input_transform_class: Input transform class.
          dataset: Dataset containing feature matrix and the response.
          search_space_digest: Search space digest.
          input_transform_options: Input transform kwargs.
  
      Returns:
          A dictionary with input transform kwargs.
      """
      input_transform_options = input_transform_options or {}
      d = input_transform_options.get("d", len(dataset.feature_names))
      bounds = torch.as_tensor(
          search_space_digest.bounds,
          dtype=torch_dtype,
          device=torch_device,
      ).T
  
      if isinstance(dataset, RankingDataset) and isinstance(
          dataset.X, SliceContainer
      ):
          d = dataset.X.values.shape[-1]
  
      indices = list(range(d))
      task_features = normalize_indices(
          search_space_digest.task_features, d=d
      )
  
      for task_feature in sorted(task_features, reverse=True):
          del indices[task_feature]
  
      input_transform_options.setdefault("d", d)
  
      if ("indices" in input_transform_options) or (len(indices) < d):
          input_transform_options.setdefault("indices", indices)
  
      if (
          ("bounds" not in input_transform_options)
          and (bounds.shape[-1] < d)
          and (len(search_space_digest.task_features) == 0)
      ):
          raise NotImplementedError(
              "Normalize transform bounds should be specified explicitly if there"
              " are task features outside the search space."
          )
  
      input_transform_options.setdefault("bounds", bounds)
  
      return input_transform_options
  
file_path: Ax/ax/models/torch/botorch_modular/input_constructors/input_transforms.py
imports: from __future__ import annotations
  from typing import Any, Dict, Optional, Type
  import torch
  from ax.core.search_space import SearchSpaceDigest
  from ax.models.torch.utils import normalize_indices
  from ax.utils.common.typeutils import _argparse_type_encoder
  from botorch.models.transforms.input import InputPerturbation, InputTransform, Normalize, Warp
  from botorch.utils.containers import SliceContainer
  from botorch.utils.datasets import RankingDataset, SupervisedDataset
  from botorch.utils.dispatcher import Dispatcher
label_desc: Use image node_id 3 for calling a global function with example usage: _input_transform_argparse_normalize(input_transform_class, dataset, search_space_digest, input_transform_options, torch_device, torch_dtype) and returns: input_transform_options