code: def set_limits_for_pool(self, pool, **kw):
          
          pool_limits = {}
  
          for time_period in ["year", "month", "week", "day", "hour"]:
              if time_period not in kw:
                  continue
  
              limit = kw.pop(time_period)
              if limit is not None and not isinstance(limit, (float, int)):
                  raise TypeError("%s must be a float or int or None",
                                  time_period)
              pool_limits[time_period] = limit
  
          if kw:
              raise ValueError("Unknown time periods specified: %s" %
                               ", ".join(kw.keys()))
  
          self.cache.set("LIMIT:%s" % pool, json_dumps(pool_limits))
          return
docs: meterer.set_limits_for_pool(pool, [time_period=value])
  
          Sets the limits for the given pool. The valid time_periods are:
          year, month, week, day, hour.