Working example of creating an Alert using script?

Hi
I tried to test the https://github.com/greenbone/gvm-tools/blob/master/scripts/start-alert-scan.gmp.py script. The alert is created but with no customization (email(s), subject, message, etc).
Is this script correct?

Thanks

Ok, something on the example is wrong, I thinkā€¦
Something like this works for me:

    recipient_email="me@mydomain.com"
    sender_email="gvmd@mydomain.com"
    alert_name=recipient_email

    res = gmp.create_alert(
      alert_name,
      comment="On demand alert",
      event=AlertEvent.TASK_RUN_STATUS_CHANGED,
      event_data={"status": "Done"},
      method=gmp.types.AlertMethod.EMAIL,
      method_data={
            "message": "Task '$n': $e",
            "notice": "2",
            "from_address": sender_email,
            "subject": "[OpenVAS-Manager] Task",
            "notice_attach_format": "c402cc3e-b531-11e1-9163-406186ea4fc5",
            "to_address": recipient_email,
            },
      condition=gmp.types.AlertCondition.ALWAYS
      )