code: def _gaussian_energy_1d(sigma):
      """
      Compute the integral of a one-dimensional squared three-dimensional
      Gaussian kernel with axis-wise standard deviation `sigma`.
      """
      mask_half_size = np.ceil(5 * sigma).astype(int)
      mask_size = 2 * mask_half_size + 1
      x = np.zeros(mask_size)
      x[mask_half_size] = 1
      y = nd.gaussian_filter1d(x, sigma)
      K = np.sum(y**2) / np.sum(y)
      return K
  
imports: import warnings
  from os.path import join
  import numpy
  import scipy.ndimage
  import scipy.stats
  from nibabel import io_orientation
  from ...None import save_image
  from ...core.image.image_spaces import make_xyz_image, xyz_affine
  from ..kernel_smooth import fwhm2sigma
  from ..registration import resample
  from ..statistics.bayesian_mixed_effects import two_level_glm
  from ..statistics.histogram import histogram
label_desc: Use image node_id 2 for calling a global function with example usage: _gaussian_energy_1d(sigma) and returns: K