<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_hdf5_series(series, output, path=None, attrs=None, **kwargs):
 """Write a Series to HDF5. See :func:`write_hdf5_array` for details of arguments and keywords. """

    if attrs is None:
        attrs = format_index_array_attrs(series)
    return write_hdf5_array(series, output, path=path, attrs=attrs, **kwargs)