code: def save(self, filename):
          ''' Writes the JSON representation of this graph to the provided
          filename, such that the graph can be easily reconstructed using
          Graph(spec=filename).
  
          Args:
              filename (str): Path at which to write out the json file.
          '''
          with open(filename, 'w') as outfile:
              json.dump(self.to_json(), outfilef save(self, filename):
          ''' Writes the JSON representation of this graph to the provided
          filename, such that the graph can be easily reconstructed using
          Graph(spec=filename).
  
          Args:
              filename (str): Path at which to write out the json file.
          '''
          with open(filename, 'w') as outfile:
              json.dump(self.to_json(), outfile)
docs: Writes the JSON representation of this graph to the provided
          filename, such that the graph can be easily reconstructed using
          Graph(spec=filename).
  
          Args:
              filename (str): Path at which to write out the json file.