def METHOD_NAME(self, macro):
    if macro.params:
        return {
            "type": "macro_function",
            "name": macro.name,
            "args": macro.params,
            "body": macro.expr.py_string(True),
        }
    else:
        # The macro translator makes heroic efforts but it occasionally fails.
        # Beware the contents of the value!
        return {"type": "macro", "name": macro.name, "value": macro.expr.py_string(True)}