<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_sbml(filename, model, y0=None, volume=1.0, is_valid=True):
 """ Save a model in the SBML format. Parameters model : NetworkModel y0 : dict Initial condition. volume : Real or Real3, optional A size of the simulation volume. is_valid : bool, optional Check if the generated model is valid. True as a default. """

    y0 = y0 or {}

    import libsbml

    document = export_sbml(model, y0, volume, is_valid)

    # with open(filename, 'w') as fout:
    #     fout.write(libsbml.writeSBMLToString(document))
    # writer = libsbml.SBMLWriter()
    # writer.writeSBML(document, filename)
    libsbml.writeSBML(document, filename)