def METHOD_NAME(self, x1, x2, last_dim_is_batch=False, diag=False, **params):
    orig_output = self.base_kernel.METHOD_NAME(x1, x2, diag=diag, last_dim_is_batch=last_dim_is_batch, **params)
    outputscales = self.outputscale
    if last_dim_is_batch:
        outputscales = outputscales.unsqueeze(-1)
    if diag:
        outputscales = outputscales.unsqueeze(-1)
        return to_dense(orig_output) * outputscales
    else:
        outputscales = outputscales.view(*outputscales.shape, 1, 1)
        return orig_output.mul(outputscales)