def counter(self, counter_name, default=0):
    """Get the current counter value.

    Args:
      counter_name: name of the counter in string.
      default: default value in int if one doesn't exist.

    Returns:
      Current value of the counter.
    """
    return self._state.counters_map.get(counter_name, default)
Get the current counter value.

    Args:
      counter_name: name of the counter in string.
      default: default value in int if one doesn't exist.

    Returns:
      Current value of the counter.