Walk me through how you would write a Python script to parse large log files and extract specific error metrics efficiently.