How would you optimize a Python script that is running out of memory while processing a multi-gigabyte CSV file?