class_docstr: Creates a new kernel according to
  
      :math:`k_{new}(x, z) = f(x)k(x, z)f(z),`
  
  where :math:`f` is a function.
  
  :param callable vscaling_fn: A vertical scaling function :math:`f`.
code: def forward(self, X, Z=None, diag=False):
      if diag:
          return (
              self.vscaling_fn(X)
              * self.kern(X, Z, diag=diag)
              * self.vscaling_fn(X)
          )
      elif Z is None:
          vscaled_X = self.vscaling_fn(X).unsqueeze(1)
          return vscaled_X * self.kern(X, Z, diag=diag) * vscaled_X.t()
      else:
          return (
              self.vscaling_fn(X).unsqueeze(1)
              * self.kern(X, Z, diag=diag)
              * self.vscaling_fn(Z).unsqueeze(0)
          )
  
imports: import numbers
  from pyro.contrib.gp.parameterized import Parameterized
label_desc: Use image node_id 2 for calling the VerticalScaling obj's underlying member method code with example usage: obj.forward(X, Z, diag) and returns: unknown, unknown, unknown