def METHOD_NAME(self, parameters, config) -> Tuple[NDArrays, int, Dict[str, Scalar]]:
    """Fit locally training model."""
    set_parameters(self.net, parameters)
    train_loss, train_acc, val_loss, val_acc = train(
        self.net,
        self.trainloader,
        self.valloader,
        epochs=self.num_epochs,
        learning_rate=self.learning_rate,
        device=self.device,
        n_batches=self.num_batches,
    )
    return_dict: Dict[str, Scalar]
    if val_loss is None or val_acc is None:
        return_dict = {"train_loss": train_loss, "train_accuracy": train_acc}
    else:
        return_dict = {
            "train_loss": train_loss,
            "train_accuracy": train_acc,
            "val_loss": val_loss,
            "val_accuracy": val_acc,
        }
    return get_parameters(self.net), len(self.trainloader), return_dict