code: def initialize_sigma2(X, Y):
      """Initialize the variance (sigma2).
  
      Parameters
      ----------
      X: numpy array
          NxD array of points for target.
  
      Y: numpy array
          MxD array of points for source.
  
      Returns
      -------
      sigma2: float
          Initial variance.
      """
      (N, D) = X.shape
      (M, _) = Y.shape
      diff = X[None, :, :] - Y[:, None, :]
      err = diff**2
      return np.sum(err) / (D * M * N)
  
file_path: dipy/dipy/align/cpd.py
imports: import numpy
  import numbers
  from warnings import warn
label_desc: Use image node_id 3 for calling a global function with example usage: initialize_sigma2(X, Y) and returns: unknown