def process_data(item_id: int, content: str, attempt: int) -> ProcessingResult:
    """
    Process a data record - initially fails for odd IDs, but succeeds on retry.
    In a real-world application, this could be data validation,
    transformation, or an ML model inference step.
    """
    # Simulate an error for odd IDs on first attempt only
    # This will succeed on retry to demonstrate the retry functionality
    error = item_id % 2 == 1 and attempt == 1
    return ProcessingResult(
        processed_content="" if error else content.upper(),
        processed_at=datetime.now(tz=timezone.utc).isoformat(),
        error=f"Processing error for item {item_id} (attempt {attempt})"
        if error
        else "",
        attempt=attempt,
    )

    Process a data record - initially fails for odd IDs, but succeeds on retry.
    In a real-world application, this could be data validation,
    transformation, or an ML model inference step.
    
examples/incremental_processing/retry.py