code: def _reverse_triu_indices(d: int) -> List[int]:
      """Computes a list of indices which, upon indexing a `d * (d - 1) / 2 + 1`-dim
      Tensor whose last element is zero, will lead to a vectorized representation of
      an upper-triangular matrix, whose diagonal is set to zero and whose super-diagonal
      elements are set to the `d * (d - 1) / 2` values in the original tensor.
  
      NOTE: This is a helper function for Orthogonal Additive Kernels, and allows the
      implementation to only register `d * (d - 1) / 2` parameters to model the second
      order interactions, instead of the full d^2 redundant terms.
  
      Args:
          d: Dimensionality that gives rise to the `d * (d - 1) / 2` quadratic terms.
  
      Returns:
          A list of integer indices in `[0, d * (d - 1) / 2]`. See above for details.
      """
      indices = []
      j = 0
      d2 = int(d * (d - 1) / 2)
      for i in range(d):
          indices.extend(
              d2 for _ in range(i + 1)
          )  # indexing zero (sub-diagonal)
          indices.extend(
              range(j, j + d - i - 1)
          )  # indexing coeffs (super-diagonal)
          j += d - i - 1
      return indices
  
imports: import math
  from typing import List, Optional, Tuple
  import numpy
  import torch
  from botorch.exceptions.errors import UnsupportedError
  from gpytorch.constraints import Interval, Positive
  from gpytorch.kernels import Kernel
  from torch import nn, Tensor
label_desc: Use image node_id 3 for calling a global function with example usage: _reverse_triu_indices(d) and returns: indices