def delete_group_slice(self, name):
        """Deletes all samples in the given group slice from the dataset.

        Args:
            name: a group slice name
        """
        if self.media_type != fom.GROUP:
            raise ValueError("Dataset has no groups")

        if name not in self._doc.group_media_types:
            raise ValueError("Dataset has no group slice '%s'" % name)

        self.delete_samples(self.select_group_slices(name))

        # Reload these fields to be safer against concurrent edits. Because
        #   the default_group_slice could've been changed elsewhere so we need
        #   to know we have the latest values.
        self._doc.reload("group_media_types", "default_group_slice")

        # DON'T use pop()! https://github.com/voxel51/fiftyone/issues/4322
        if name in self._doc.group_media_types:
            del self._doc.group_media_types[name]

        new_default = next(iter(self._doc.group_media_types.keys()), None)

        if self._doc.default_group_slice == name:
            self._doc.default_group_slice = new_default

        if self._group_slice == name:
            self._group_slice = new_default

        self.save()
Deletes all samples in the given group slice from the dataset.

        Args:
            name: a group slice name
        
fiftyone/core/dataset.py