def _group_stats(self, groups):
        """
        Descriptive statistics of the groups.
        """
        # better handled with np.unique(..., return_counts=True)
        gsize = {}
        for x in groups:
            if gsize not in x:
                gsize[x] = 0
            gsize[x] += 1
        gsize = np.asarray(list(gsize.values()))
        return gsize.min(), gsize.max(), gsize.mean(), len(gsize)
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/duration/hazard_regression.py/PHRegResults._group_stats/swapped operands of `not in`