code: def to_openpnm(net, filename):
      r
      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)
docs: 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.