ScriptGenerator: fix error in generated scripts

In Python, we do not need (or want) to reference the namespace when
calling the imported function.