def _summarize_in_roi(self, label_mask, num_clusters_per_roi=1, metric='minkowski'):
        """returns a single row summarizing (typically via mean) all rows in an ROI."""

        this_label = self.carpet[label_mask.flatten(), :]
        if num_clusters_per_roi == 1:
            out_matrix = self._summary_func(this_label, axis=0)
        else:
            out_matrix = self._make_clusters(this_label, num_clusters_per_roi, metric)

        return out_matrix