def METHOD_NAME(h, **kwargs):
    """
    Compute the variance of the input tensor along the second to last dimension.
    Parameters
    ----------
    h : torch.Tensor
        Input tensor.
    Returns
    -------
    torch.Tensor
        Variance of the input tensor along the second to last dimension.
    """
    h_mean_squares = torch.mean(h * h, dim=-2)
    h_mean = torch.mean(h, dim=-2)
    var = torch.relu(h_mean_squares - h_mean * h_mean)
    return var