code: def test_mnist_certification_training(
      art_warning, fix_get_mnist_data
  ):
      """
      Assert that the training loop runs without errors
      """
      from art.defences.trainer import (
          AdversarialTrainerCertifiedIBPPyTorch,
      )
  
      device = torch.device(
          "cuda:0" if torch.cuda.is_available() else "cpu"
      )
  
      ptc = get_image_classifier_pt(from_logits=True, use_maxpool=False)
      ptc.model.to(device)
  
      optimizer = torch.optim.Adam(ptc.model.parameters(), lr=0.0001)
  
      box_model = PyTorchIBPClassifier(
          model=ptc.model,
          clip_values=(0, 1),
          loss=torch.nn.CrossEntropyLoss(),
          optimizer=optimizer,
          input_shape=(1, 28, 28),
          nb_classes=10,
      )
  
      mnist_data = fix_get_mnist_data[0]
      mnist_labels = torch.tensor(fix_get_mnist_data[1])
  
      from torch.optim.lr_scheduler import MultiStepLR
  
      scheduler = MultiStepLR(
          box_model._optimizer, milestones=[2, 5], gamma=0.1
      )
      trainer = AdversarialTrainerCertifiedIBPPyTorch(
          classifier=box_model, bound=0.2
      )
      trainer.fit(
          x=mnist_data,
          y=mnist_labels,
          scheduler=scheduler,
          batch_size=32,
          nb_epochs=2,
          limits=[0, 1],
      )
  
imports: import pytest
  import torch
  import numpy
  from art.estimators.certification.interval import PyTorchIBPClassifier
  from art.estimators.certification.interval import PyTorchIntervalConv2D
  from art.utils import load_dataset
  from tests.utils import ARTTestException
  from tests.utils import get_image_classifier_pt
label_desc: Use image node_id 15 for calling a global function with example usage: test_mnist_certification_training(art_warning, fix_get_mnist_data) without return types