def METHOD_NAME(self):
    trainer = Trainer("test_multiple_named_components_loss_logging", model_checkpoints_location="local")
    dataloader = classification_test_dataloader(batch_size=10)
    model = models.get(Models.RESNET18, arch_params={"num_classes": 5})
    train_params = {
        "max_epochs": 1,
        "lr_updates": [1],
        "lr_decay_factor": 0.1,
        "lr_mode": "step",
        "lr_warmup_epochs": 0,
        "initial_lr": 0.1,
        "loss": CriterionWithNamedComponents(),
        "optimizer": "SGD",
        "criterion_params": {},
        "optimizer_params": {"weight_decay": 1e-4, "momentum": 0.9},
        "train_metrics_list": [Accuracy()],
        "valid_metrics_list": [Accuracy()],
        "metric_to_watch": "Accuracy",
        "greater_metric_to_watch_is_better": True,
    }
    trainer.train(model=model, training_params=train_params, train_loader=dataloader, valid_loader=dataloader)
    self.assertListEqual(trainer.loss_logging_items_names, ["CriterionWithNamedComponents/loss_A", "CriterionWithNamedComponents/loss_B"])