code: def _NotifyLegacy(username, notification_type, message, object_reference):
    
  
    try:
      with aff4.FACTORY.Open(
          aff4.ROOT_URN.Add("users").Add(username),
          aff4_type=aff4_users.GRRUser,
          mode="rw") as fd:
  
        args = _MapLegacyArgs(notification_type, message, object_reference)
        args[0] += ":%s" % notification_type
        fd.Notify(*args)
  
    except aff4.InstantiationError:
      logging.error("Trying to notify non-existent user: %s", username)
docs: Schedules a legacy AFF4 user notification.