code: def __init__(
      self,
      criterion: Type[nn.Module],
      metrics: Dict[str, Type[torchmetrics.Metric]],
      n_models: int = 0,
      learning_rate: float = 0.001,
      weight_decay: float = 0.0,
      optimizer: Type[optim.Optimizer] = optim.Adam,
  ):
      super().__init__()
      self.save_hyperparameters(
          "criterion", "optimizer", "learning_rate", "weight_decay"
      )
      self.criterion = criterion()
      self.criterion_cls = criterion
      self.optimizer = optimizer
      self.metrics = nn.ModuleDict(
          {name: cls() for name, cls in metrics.items()}
      )
      self.metrics_args = metrics
      self.n_models = n_models
  
imports: import warnings
  from typing import Dict, List, Optional, Union, Type
  import torch.nn
  import torch.optim
  import torchmetrics
  from torch.utils.data import DataLoader
  import nni
  from ..lightning import LightningModule, _AccuracyWithLogits, Lightning
  from .trainer import Trainer
label_desc: Use image node_id 1 to create a new _MultiModelSupervisedLearningModule object from inherited base classes: LightningModule with example: obj = _MultiModelSupervisedLearningModule(criterion, metrics, n_models, learning_rate, weight_decay, optimizer)