code: def export(self, path, session):
      
      def variables_saver(variables_path):
        if self._saver:
          self._saver.save(
              session, variables_path,
              write_meta_graph=False,
              write_state=False)
  
      self._spec._export(path, variables_saver)
docs: See `Module.export`.