We want to show a deprecation warning when a user calls `variable_counter` instead of the new `variable_iteration.index`.
Since counter variables are instance variables, this code defines a getter method for counter variables so we can warn and then return its original value.