<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _dump_data(self, mode=['props']):
 r""" Dump data from all objects in project to an HDF5 file. Note that 'pore.coords', 'throat.conns', 'pore.all', 'throat.all', and all labels pertaining to the linking of objects are kept. Parameters mode : string or list of strings The type of data to be dumped to the HDF5 file. Options are: **'props'** : Numerical data such as 'pore.diameter'. The default is only 'props'. **'labels'** : Boolean data that are used as labels. Since this is boolean data it does not consume large amounts of memory and probably does not need to be dumped. See Also -------- _fetch_data Notes ----- In principle, after data is fetched from an HDF5 file, it should physically stay there until it's called upon. This let users manage the data as if it's in memory, even though it isn't. This behavior has not been confirmed yet, which is why these functions are hidden. """

        with h5py.File(self.name + '.hdf5') as f:
            for obj in self:
                for key in list(obj.keys()):
                    tempname = obj.name + '|' + '_'.join(key.split('.'))
                    arr = obj[key]
                    if 'U' in str(obj[key][0].dtype):
                        pass
                    elif 'all' in key.split('.'):
                        pass
                    else:
                        f.create_dataset(name='/'+tempname, shape=arr.shape,
                                         dtype=arr.dtype, data=arr)
            for obj in self:
                obj.clear(mode=mode)