Given this problem specification and implementation:

**Problem Specification:**
{{ problem_description }}

**Source Code:**
{{ source_content }}

Generate a comprehensive pytest test suite that:
1. Tests all example cases from the problem description
2. Tests edge cases and boundary values
3. Uses parameterized tests for multiple test cases
4. Includes appropriate timeouts
5. Has clear test descriptions
6. Focuses on traditional unit testing approaches

IMPORTANT: Be careful when designing test cases, especially for problems that involve strings.  Pay close attention to any definitions in the problem specification.  Make sure that the expected result is correct for every case.

When generating the tests for this source code, think through these steps internally:
**Step 1** Analyze the problem specification - what are the key requirements and definitions?
**Step 2** Analyze the code - what core algorithms or logic are used?
**Step 3** Plan test strategy - what specific happy path, edge cases, and error conditions should be tested?
**Step 4** Validate your test plan - double-check that the tests make sense and the expected outputs are correct
**Step 5** Implement pytest code - generate code for all test cases in the validated test plan
**Step 6** Review the generated code - are there any syntax errors or mistakes in the implementation?

IMPORTANT: Do NOT include verbose reasoning in your response. Focus on generating correct, comprehensive test code.

The resulting test code should:
1. Import the function '{{ function_name }}' from the module (absolute import)
2. Include all necessary imports (pytest, but NOT hypothesis)
3. Be ready to run with pytest
4. Use @pytest.mark.parametrize for multiple test cases
5. Test specific values rather than generating random inputs

Example import:
from {{ module_name }} import {{ function_name }}

Note: Use absolute imports (not relative imports with '.') so tests can be run directly with pytest.

{% if evaluator_analysis %}
IMPORTANT: This is a TEST REGENERATION ATTEMPT. The previous tests were incorrect.

ANALYSIS OF WHAT WENT WRONG:
{{ evaluator_analysis }}

INSTRUCTIONS FOR FIXING THE ISSUES:
{{ evaluator_instructions }}

PREVIOUS TESTS CODE:
{% if previous_test_path %}
{{ read_file(previous_test_path) }}
{% endif %}

Think through the analysis of what went wrong.  Carefully follow the instructions for fixing the issues to correct the problems.  Start with the previous test code and make the minimum changes necessary to address the failures.
{% endif %}
