def _get_swsft_coeff_index(ell, m):
  """Get index in coefficient array.

  Returns the index corresponding to (ell, m) in the coefficient array in the
  format returned by swsft_forward_naive()

  Args:
    ell: Degree (int).
    m: Order (int).

  Returns:
    An index (int).
  """
  return ell**2 + m + ell