code: def save(self, filename=None, tc=None):
          
          if filename is None:
              filename = self.filename
  
          for sub in self.sub_workflows:
              sub.save()
  
          # FIXME this is ugly as pegasus 4.9.0 does not support the full
          # transformation catalog in the DAX. I have asked Karan to fix this so
          # that executables and containers can be specified in the DAX itself.
          # Karan says that XML is going away in Pegasus 5.x and so this code
          # will need to be re-written anyway.
          #
          # the transformation catalog is written in the same directory as the
          # DAX.  pycbc_submit_dax needs to know this so that the right
          # transformation catalog is used when the DAX is planned.
          if tc is None:
              tc = '{}.tc.txt'.format(filename)
          p = os.path.dirname(tc)
          f = os.path.basename(tc)
          if not p:
              p = '.'
  
          tc = TransformationCatalog(p, f)
  
          for e in self._adag.executables.copy():
              tc.add(e)
              try:
                  tc.add_container(e.container)
              except:
                  pass
              self._adag.removeExecutable(e)
  
          f = open(filename, "w")
          self._adag.writeXML(f)
          tc.write()
docs: Write this workflow to DAX file