code: def save(cls, flow, fname):
          
          result = None
          try:
              f = open(fname, 'w')
              f.write(flow.to_json())
              f.close()
          except Exception, e:
              result = str(e)
          return result
docs: Saves the flow to a JSON file.
  
          :param flow: the flow to save
          :type flow: Flow
          :param fname: the file to load
          :type fname: str
          :return: None if successful, otherwise error message
          :rtype: str