Describe the concept of closures and provide a practical use case.
Implement run_counter(initial, operations), where each operation is a dictionary with type "add" and an integer value, or type "read". Return the running total after every operation. Use a nested closure to encapsulate the total and update it with nonlocal.
Signature: def run_counter(initial, operations): Input is an integer and a list of operation dictionaries. Output is a list of integers.
def run_counter(initial, operations):