code: def save_project(self, project, filename=''):
          r
          if filename == '':
              filename = project.name
          filename = self._parse_filename(filename=filename, ext='pnm')
  
          # Save dictionary as pickle
          d = {project.name: project}
          with open(filename, 'wb') as f:
              pickle.dump(d, f)
docs: r"""
          Saves given Project to a 'pnm' file
  
          This will include all of associated objects, including algorithms.
  
          Parameters
          ----------
          project : OpenPNM Project
              The project to save.
  
          filename : string, optional
              If no filename is given, the given project name is used. See Notes
              for more information.
  
          See Also
          --------
          save_workspace
  
          Notes
          -----
          The filename can be a string such as 'saved_file.pnm'.  The string can
          include absolute path such as 'C:\networks\saved_file.pnm', or can
          be a relative path such as '..\..\saved_file.pnm', which will look
          2 directories above the current working directory.  Can also be a
          path object object such as that produced by ``pathlib`` or
          ``os.path`` in the Python standard library.