code: def weighted_counts(self):
          
          if not self.is_weighted:
              return self.unweighted_counts
          return _WeightedCountMeasure(self._cube_dict, self._all_dimensions)
docs: _WeightedCountMeasure object for this cube.
  
          This object provides access to weighted counts for this cube, if
          available. If the cube response is not weighted, the
          _UnweightedCountMeasure object for this cube is returned.