{#- Python visitor method template

   Context variables:
   - method_name: visitor method name (e.g., "visit_text")
   - params: parameter list (e.g., "self, ctx, text")
   - action_type: "skip", "continue", "preserve_html", "custom", "custom_template"
   - action_value: escaped string value (for custom)
   - action_template: escaped template string (for custom_template)
#}
        def {{ method_name }}({{ params }}):  # noqa: A002, ANN001, ANN202, ARG002
{% if action_type == "skip" %}
            return "Skip"
{% elif action_type == "continue" %}
            return "Continue"
{% elif action_type == "preserve_html" %}
            return "PreserveHtml"
{% elif action_type == "custom" %}
            return {"Custom": "{{ action_value }}"}
{% elif action_type == "custom_template" %}
{% if return_form == "bare_string" %}
            return f'{{ action_template }}'
{% else %}
            return {"Custom": f'{{ action_template }}'}
{% endif %}
{% endif %}
