code: def save_pstat(self, path):
          
          stats = {}
          for s in self.stats:
              if not s.exclude:
                  stats.update(s.to_dict())
  
          with open(path, 'wb') as f:
              marshal.dump(stats, f)
docs: Save the modified pstats file