''' In this exercise, you will explore how variables behave when passed to a function, and how mutating a list (which is a mutable object) inside a function affects the original list defined outside the function. You will also observe the behavior of immutable objects such as integers and strings when passed to a function. ''' ''' You are given a list of cell counts from different biological samples. The function you will implement will add a new value to this list to update it with new data. Additionally, the function will attempt to modify an integer variable, but notice the difference in behavior between the mutable list and the immutable integer. We have a function `update_sample` that: * Appends a new value to a list of cell counts (this list is defined outside the function). * Attempts to modify a variable (an integer) defined outside the function. After running this code, observe the behavior of the list and the integer variable outside the function. ''' # Global list (mutable) and integer (immutable) defined outside the function cell_counts = [100, 120, 130] total_samples = 3 def update_sample(new_count, cell_counts = cell_counts, total_samples = total_samples): # Add new sample count to the list (mutable object) cell_counts.append(new_count) # Attempt to modify total_samples (immutable object) total_samples += 1 # This will not affect the global variable! # Call the function with a new sample count update_sample(150) # Print the list and the integer outside the function print("Updated cell counts:", cell_counts) # Expected to be updated print("Total samples:", total_samples) # Expected to NOT be updated assert cell_counts == [100, 120, 130, 150], "cell counts should be updated" assert total_samples == 4, "total samples should be updated" ''' Why does the list `cell_counts` get updated, but `total_samples` does not change? Modify the code to fix the behavior of `total_samples` so that it updates correctly. Hint: You might need to use the global keyword or return the updated value from the function. '''