class_docstr: Moment matching for multi-source domain adaptation (M3SDA).
  
  Reference:
      Peng, X., Bai, Q., Xia, X., Huang, Z., Saenko, K., & Wang, B. (2019). Moment matching for multi-source
      domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision
      (pp. 1406-1415).
      https://openaccess.thecvf.com/content_ICCV_2019/html/Peng_Moment_Matching_for_Multi-Source_Domain_Adaptation_ICCV_2019_paper.html
code: def __init__(
      self,
      dataset,
      feature_extractor,
      task_classifier,
      n_classes: int,
      target_domain: str,
      k_moment: int = 3,
      **base_params,
  ):
      super().__init__(
          dataset,
          feature_extractor,
          task_classifier,
          n_classes,
          target_domain,
          **base_params,
      )
      self.classifiers = dict()
      for domain_ in self.domain_to_idx.keys():
          if domain_ != target_domain:
              self.classifiers[domain_] = task_classifier(
                  self.feature_dim, n_classes
              )
      # init classifiers as nn.ModuleDict, otherwise it will not be optimized
      self.classifiers = nn.ModuleDict(self.classifiers)
      self.k_moment = k_moment
  
imports: import torch
  import torch.nn
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.metrics.pairwise import pairwise_kernels
  from sklearn.preprocessing import LabelBinarizer
  from torch.linalg import multi_dot
  from torch.nn.functional import one_hot
  import kale.predict.losses
  from kale.embed.image_cnn import _Bottleneck
  from kale.pipeline.domain_adapter import BaseAdaptTrainer
label_desc: Use image node_id 1 to create a new M3SDATrainer object from inherited base classes: BaseMultiSourceTrainer with example: obj = M3SDATrainer(dataset, feature_extractor, task_classifier, n_classes, target_domain, k_moment)