Automation for Jira (Data Center) version 7.2.1 - Some functions not recognized when using ScriptRunner third party extension

This documentation clearly states the following:
Additionally there are two utility functions available for writing information and error messages to the Automation for Jira audit log. They are addMessage(String message) and addError(String errorMessage)

However, when adding either to the script, I get an error ‘Cannot find matching method’.
Do I need to import any packages to get this to work? If so, what package(s) do I need to import?

duplicate of, let’s keep the conversation there.