Whenever you're ready, walk me through how you'd approach this.
Explain how Python manages memory for large data structures and how to optimize memory usage when processing millions of transaction records.
Cover object allocation, reference counting, cyclic garbage collection, and why process memory may remain high after objects are deleted. Discuss practical techniques such as streaming, chunking, avoiding unnecessary copies, and choosing memory-efficient data representations.