def generate_large_code_content(min_size):
    """Generate a Python file content that's guaranteed to be larger than min_size tokens."""
    function_template = """
def function{num}(param1, param2, param3):
    \"\"\"
    This is a detailed docstring for function number {num}.
    It performs a complex calculation with the provided parameters.

    Args:
        param1: The first parameter
        param2: The second parameter
        param3: The third parameter

    Returns:
        A calculated result based on the parameters
    \"\"\"
    # Initialize an accumulator
    accumulator = 0

    # Perform a complex calculation
    for i in range(param1):
        for j in range(param2):
            accumulator += i * j * param3

    # Create a large result object
    result = {{
        "function_number": {num},
        "calculation_result": accumulator,
        "input_params": {{
            "param1": param1,
            "param2": param2,
            "param3": param3
        }},
        "metadata": {{
            "created_at": "2023-06-01T12:00:00Z",
            "version": "1.0.0",
            "is_valid": True
        }}
    }}

    return result

"""
    content = ""
    size = 0

    # Keep adding functions until we exceed the required size
    i = 0

    # Add functions until the content is large enough
    while size <= min_size and i < 200:  # Cap at 200 functions to prevent infinite loops
        content += function_template.format(num=i)
        size = count_tokens(content)  # Count tokens of just the content, not the entire entity
        i += 1

    if size <= min_size:
        pytest.skip(f"Could not generate content large enough: {size} < {min_size}")

    return content
Generate a Python file content that's guaranteed to be larger than min_size tokens.
backend/tests/unit/platform/transformers/test_code_file_chunker.py