@with_write_hdf5<EOL>def write_hdf5_dict(tsdict, h5f, group=None, **kwargs):
<EOL>if group and group not in h5f:<EOL><INDENT>h5g = h5f.create_group(group)<EOL><DEDENT>elif group:<EOL><INDENT>h5g = h5f[group]<EOL><DEDENT>else:<EOL><INDENT>h5g = h5f<EOL><DEDENT>kwargs.setdefault('<STR_LIT>', '<STR_LIT>')<EOL>for key, series in tsdict.items():<EOL><INDENT>series.write(h5g, path=str(key), **kwargs)<EOL><DEDENT>
Write a `TimeSeriesBaseDict` to HDF5

    Each series in the dict is written as a dataset in the group