class_docstr: Computes a covariance matrix based on the inverse multiquadratic Hamming kernel
  between inputs :math:`\mathbf{x_1}` and :math:`\mathbf{x_2}`:
  
  .. math::
     \begin{equation*}
          k_{\text{H-IMQ}}(\mathbf{x_1}, \mathbf{x_2}) =
          \left( \frac{1 + \alpha}{\alpha + d_{\text{Hamming}}(x1, x2)} \right)^\beta
     \end{equation*}
  where :math:`\alpha` and :math:`\beta` are strictly positive scale parameters.
  This kernel was proposed in `Biological Sequence Kernels with Guaranteed Flexibility`.
  See http://arxiv.org/abs/2304.03775 for more details.
  
  This kernel is meant to be used for fixed-length one-hot encoded discrete sequences.
  Because GPyTorch is particular about dimensions, the one-hot sequence encoding should be flattened
  to a vector with length :math:`T \times V`, where :math:`T` is the sequence length and :math:`V` is the
  vocabulary size.
  
  :param vocab_size: The size of the vocabulary.
  :param batch_shape: Set this if you want a separate kernel hyperparameters for each batch of input
      data. It should be :math:`B_1 \times \ldots \times B_k` if :math:`\mathbf{x_1}` is
      a :math:`B_1 \times \ldots \times B_k \times N \times D` tensor.
  :param alpha_prior: Set this if you want to apply a prior to the
      alpha parameter.
  :param: alpha_constraint: Set this if you want to apply a constraint
      to the alpha parameter. If None is passed, the default is `Positive()`.
  :param beta_prior: Set this if you want to apply a prior to the
      beta parameter.
  :param beta_constraint: Set this if you want to apply a constraint
      to the beta parameter. If None is passed, the default is `Positive()`.
  
  Example:
      >>> vocab_size = 8
      >>> x_cat = torch.tensor([[7, 7, 7, 7], [5, 7, 3, 4]])  # batch_size x seq_length
      >>> x_one_hot = F.one_hot(x_cat, num_classes=vocab_size)  # batch_size x seq_length x vocab_size
      >>> x_flat = x_one_hot.view(*x_cat.shape[:-1], -1)  # batch_size x (seq_length * vocab_size)
      >>> covar_module = gpytorch.kernels.HammingIMQKernel(vocab_size=vocab_size)
      >>> covar = covar_module(x_flat)  # Output: LinearOperator of size (2 x 2)
code: def _beta_param(self, m: Kernel) -> Tensor:
      # Used by the beta_prior
      return m.beta
  
imports: from typing import Optional
  import torch
  from torch import nn, Tensor
  from gpytorch.constraints.constraints import Interval, Positive
  from gpytorch.kernels.kernel import Kernel
  from gpytorch.priors.prior import Prior
label_desc: Use image node_id 9 for calling the HammingIMQKernel obj's underlying member method code with example usage: obj._beta_param(m) and returns: m