class_docstr: Base class for a family of isotropic covariance kernels which are functions of the
  distance :math:`|x-z|/l`, where :math:`l` is the length-scale parameter.
  
  By default, the parameter ``lengthscale`` has size 1. To use the isotropic version
  (different lengthscale for each dimension), make sure that ``lengthscale`` has size
  equal to ``input_dim``.
  
  :param torch.Tensor lengthscale: Length-scale parameter of this kernel.
docstr: Returns :math:`\|\frac{X-Z}{l}\|^2`.
docstr_tok: ["Returns",":","math",":","`","\\|\\frac","{","X-Z","}","{","l","}","\\|^2","`","."]
code: def _square_scaled_dist(self, X, Z=None):
      r"""
      Returns :math:`\|\frac{X-Z}{l}\|^2`.
      """
      if Z is None:
          Z = X
      X = self._slice_input(X)
      Z = self._slice_input(Z)
      if X.size(1) != Z.size(1):
          raise ValueError(
              "Inputs must have the same number of features."
          )
  
      scaled_X = X / self.lengthscale
      scaled_Z = Z / self.lengthscale
      X2 = (scaled_X**2).sum(1, keepdim=True)
      Z2 = (scaled_Z**2).sum(1, keepdim=True)
      XZ = scaled_X.matmul(scaled_Z.t())
      r2 = X2 - 2 * XZ + Z2.t()
      return r2.clamp(min=0)
  
imports: import torch
  from torch.distributions import constraints
  from pyro.contrib.gp.kernels.kernel import Kernel
  from pyro.nn.module import PyroParam
label_desc: Use image node_id 2 for calling the Isotropy obj's underlying member method code with example usage: obj._square_scaled_dist(X, Z) and returns: r2