code: def test_argparse_scalematern_kernel(self) -> None:
      covar_module_kwargs_defaults = [
          {
              "ard_num_dims": 10,
              "lengthscale_prior_concentration": 6.0,
              "lengthscale_prior_rate": 3.0,
              "outputscale_prior_concentration": 2.0,
              "outputscale_prior_rate": 0.15,
              "batch_shape": torch.Size([2]),
          },
          {
              "ard_num_dims": 9,
              "lengthscale_prior_concentration": 6.0,
              "lengthscale_prior_rate": 3.0,
              "outputscale_prior_concentration": 2.0,
              "outputscale_prior_rate": 0.15,
              "batch_shape": torch.Size([]),
          },
      ]
  
      for i, botorch_model_class in enumerate(
          [SingleTaskGP, MultiTaskGP]
      ):
          covar_module_kwargs = covar_module_argparse(
              ScaleMaternKernel,
              botorch_model_class=botorch_model_class,
              dataset=self.dataset,
              lengthscale_prior=GammaPrior(6.0, 3.0),
              outputscale_prior=GammaPrior(2, 0.15),
          )
  
          covar_module_kwargs[
              "lengthscale_prior_concentration"
          ] = covar_module_kwargs[
              "lengthscale_prior"
          ].concentration.item()
          covar_module_kwargs[
              "lengthscale_prior_rate"
          ] = covar_module_kwargs["lengthscale_prior"].rate.item()
  
          covar_module_kwargs[
              "outputscale_prior_concentration"
          ] = covar_module_kwargs[
              "outputscale_prior"
          ].concentration.item()
          covar_module_kwargs[
              "outputscale_prior_rate"
          ] = covar_module_kwargs["outputscale_prior"].rate.item()
  
          covar_module_kwargs.pop("lengthscale_prior")
          covar_module_kwargs.pop("outputscale_prior")
  
          for key in covar_module_kwargs.keys():
              self.assertAlmostEqual(
                  covar_module_kwargs[key],
                  covar_module_kwargs_defaults[i][key],
                  places=4,
              )
  
      X = torch.randn((10, 10))
      Y = torch.randn((10, 1))
      dataset = SupervisedDataset(
          X=X,
          Y=Y,
          feature_names=[f"x{i}" for i in range(10)],
          outcome_names=["y"],
      )
      covar_module_kwargs = covar_module_argparse(
          ScaleMaternKernel,
          botorch_model_class=SingleTaskGP,
          dataset=dataset,
          lengthscale_prior=GammaPrior(6.0, 3.0),
          outputscale_prior=GammaPrior(2, 0.15),
      )
  
      self.assertEqual(
          covar_module_kwargs["batch_shape"], torch.Size([])
      )
  
imports: from __future__ import annotations
  from unittest.mock import patch
  import torch
  from ax.models.torch.botorch_modular.input_constructors.covar_modules import covar_module_argparse
  from ax.models.torch.botorch_modular.kernels import ScaleMaternKernel
  from ax.utils.common.testutils import TestCase
  from botorch.models.gp_regression import SingleTaskGP
  from botorch.models.multitask import MultiTaskGP
  from botorch.utils.datasets import SupervisedDataset
  from gpytorch.kernels.kernel import Kernel
  from gpytorch.priors import GammaPrior
label_desc: Use image node_id 6 for calling the CovarModuleArgparseTest obj's underlying member method code with example usage: obj.test_argparse_scalematern_kernel() without return types