code: def _prepare(self, data, groupname):
          
          if groupname in self.h5file:
              del self.h5file[groupname]
          group = self.h5file.create_group(groupname)
          group.attrs['version'] = self.version
          data.init_group(
              group, self.chunk_size, self.compression, self.compression_opts)
          return group
docs: Clear the group if existing and initialize empty datasets.