code: def _calc_keys(self, config, name, timestamp):
      '''
      Calculate keys given a stat name and timestamp.
      '''
      i_bucket = config['i_calc'].to_bucket( timestamp )
      r_bucket = config['r_calc'].to_bucket( timestamp )
  
      i_key = '%s%s:%s:%s'%(self._prefix, name, config['interval'], i_bucket)
      r_key = '%s:%s'%(i_key, r_bucket)
  
      return i_bucket, r_bucket, i_key, r_kef _calc_keys(self, config, name, timestamp):
      '''
      Calculate keys given a stat name and timestamp.
      '''
      i_bucket = config['i_calc'].to_bucket( timestamp )
      r_bucket = config['r_calc'].to_bucket( timestamp )
  
      i_key = '%s%s:%s:%s'%(self._prefix, name, config['interval'], i_bucket)
      r_key = '%s:%s'%(i_key, r_bucket)
  
      return i_bucket, r_bucket, i_key, r_key
docs: Calculate keys given a stat name and timestamp.