code: def __init__(
      self,
      sender_email: str,
      sender_login_credential: str,
      smtp_server: smtplib.SMTP,
      alert_frequency: int,
  ):
      super().__init__()
      destination_email = (
          sender_email  # sending e-mail to yourself in that case
      )
      self.notif = EmailNotificator(
          sender_email,
          sender_login_credential,
          destination_email,
          smtp_server,
      )
  
      self.alert_frequency = alert_frequency
  
file_path: poutyne/examples/medium_post/train_with_alert_callback.py
imports: import smtplib
  from typing import Dict
  import torch
  import torch.nn
  from notif.notificator import EmailNotificator
  from torch.utils.data import random_split
  from torchvision.datasets import MNIST
  from torchvision.transforms import ToTensor
  from poutyne import Experiment, Callback
label_desc: Use image node_id 1 to create a new TrainingAlertCallback object from inherited base classes: Callback with example: obj = TrainingAlertCallback(sender_email, sender_login_credential, smtp_server, alert_frequency)