(name)
return total
Retrieve the value for a given sharded counter.

  Args:
    name: The name of the counter.

  Returns:
    Integer; the cumulative count of all sharded counters for the given
      counter name.
Retrieve the value for a given sharded counter.
Retrieve the value for a given sharded counter .
def get_count(name):
  """Retrieve the value for a given sharded counter.

  Args:
    name: The name of the counter.

  Returns:
    Integer; the cumulative count of all sharded counters for the given
      counter name.
  """
  total = memcache.get(name)
  if total is None:
    total = 0
    all_keys = TailboneGeneralCounterShardConfig.all_keys(name)
    for counter in ndb.get_multi(all_keys):
      if counter is not None:
        total += counter.count
    memcache.add(name, total, 60)
  return total
def get_count ( name ) : total = memcache . get ( name ) if total is None : total = 0 all_keys = TailboneGeneralCounterShardConfig . all_keys ( name ) for counter in ndb . get_multi ( all_keys ) : if counter is not None : total += counter . count memcache . add ( name , total , 60 ) return total