code: def _init_parameters(self, ref_params):
      if self.mask is not None:
          data = self.data[self.mask]
      else:
          data = self.data
  
      nclasses = self.mixmat.shape[0]
      if nclasses <= 5:
          key = str(self.mixmat.shape[0]) + "k"
          ref_mu = ref_params[key]["mu"]
          ref_sigma = ref_params[key]["sigma"]
      else:
          ref_mu = np.linspace(
              ref_params["3k"]["mu"][0],
              ref_params["3k"]["mu"][-1],
              num=nclasses,
          )
          ref_sigma = np.linspace(
              ref_params["3k"]["sigma"][0],
              ref_params["3k"]["sigma"][-1],
              num=nclasses,
          )
  
      return moment_matching(
          data,
          ref_mu,
          ref_sigma,
          ref_params["glob_mu"],
          ref_params["glob_sigma"],
      )
  
imports: import numpy
  from .segmentation import Segmentation, map_from_ppm, moment_matching
label_desc: Use image node_id 2 for calling the BrainT1Segmentation obj's underlying member method code with example usage: obj._init_parameters(ref_params) and returns: moment_matching