<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_openpnm(net, filename):
 r""" Save the result of the `snow` network extraction function in a format suitable for opening in OpenPNM. Parameters net : dict The dictionary object produced by the network extraction functions filename : string or path object The name and location to save the file, which will have `.net` file extension. """

    from openpnm.network import GenericNetwork
    # Convert net dict to an openpnm Network
    pn = GenericNetwork()
    pn.update(net)
    pn.project.save_project(filename)
    ws = pn.project.workspace
    ws.close_project(pn.project)