Migrate "telegramAction", "sendTelegram" to Jython

I would like to migrate the following rule to Jyhton, but unfortunately I do not know how. I am grateful for any help!

rule "A Lacross sensor stopped reporting"
when
    Member of LacrossDeviceStatuses changed to UNDEF
then
    val telegramAction = getActions("telegram","telegram:telegramBot:xxxxx")
    telegramAction.sendTelegram("LaCrosse sensor stopped reporting")
end

https://openhab-scripters.github.io/openhab-helper-libraries/Guides/Actions.html#use-an-addon-bundle-action

Here ist my new Jython rule:

from core.rules import rule
from core.triggers import when
from core.actions import Telegram

@rule("lacrosse alive", description="blablabla") 
@when("Member of LacrossDeviceStatuses changed to UNDEF")
def sensoren_alive(event):
	sensoren_alive.log.info("LaCrosse sensor stopped reporting")
	Telegram.sendTelegram("andi", "LaCrosse sensor stopped reporting")

unfortunately I get the following error message:

2019-12-30 20:02:56.652 [ERROR] [ion.module.script.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab2/automation/jsr223/python/personal/alive.py': ImportError: cannot import name Telegram in <script> at line number 3

I’m using the new Telegramm Binding on OH2.5

Than it works like the MQTT example at that link.

Pretty much everything that you do in Rules DSL has a one-to-one analog in Jython.

telegramAction = actions.get("telegram", "telegram:telegramBot:xxxxx")
telegramAction.sendTelegram("LaCrosse sensor stopped reporting")

Thank you Rich. Unfortunately the problem is still there, there seems to be a problem with the import.

2019-12-30 20:31:33.214 [ERROR] [ion.module.script.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab2/automation/jsr223/python/personal/alive.py': ImportError: cannot import name Telegram in <script> at line number 3

As my example shows, there is no import. It’s just like the MQTT example in the helper docs:

# no import needed
actions.get("mqtt", "mqtt:systemBroker:embedded-mqtt-broker").publishMQTT("test/system/started", "true")

I’ve submitted a PR with updates to those docs to reference the 2.x binding Actions instead of the 1.x Actions where one exists.

Thank you, that was the solution, the rule works now!