<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _denominator(self, weighted, include_transforms_for_dims, axis):
 """Calculate denominator for percentages. Only include those H&S dimensions, across which we DON'T sum. These H&S are needed because of the shape, when dividing. Those across dims which are summed across MUST NOT be included, because they would change the result."""


        table = self._measure(weighted).raw_cube_array
        new_axis = self._adjust_axis(axis)
        index = tuple(
            None if i in new_axis else slice(None) for i, _ in enumerate(table.shape)
        )
        hs_dims = self._hs_dims_for_den(include_transforms_for_dims, axis)
        den = self._apply_subtotals(self._apply_missings(table), hs_dims)
        return np.sum(den, axis=new_axis)[index]