docs: def WriteUserNotification(self, notification):
      """Writes a notification for a given user."""
      if notification.username not in self.users:
        raise db.UnknownGRRUserError(notification.username)
  
      cloned_notification = notification.Copy()
      if not cloned_notification.timestamp:
        cloned_notification.timestamp = rdfvalue.RDFDatetime.Now()
  
      self.notifications_by_username.setdefault(cloned_notification.username,
                                                []).append(cloned_notification)