code: def validate(self):
          
          # define tmpfile
          (fd, tmpfile) = tempfile.mkstemp()
          os.close(fd)
          try:
              # save workflow object to tmpfile,
              # do not recursively call validate function
              self.save(tmpfile, mode='abs', validate=False)
              # load workflow from tmpfile
              document_loader, processobj, metadata, uri = load_cwl(tmpfile)
          finally:
              # cleanup tmpfile
              os.remove(tmpfile)
docs: Validate workflow object.
  
          This method currently validates the workflow object with the use of
          cwltool. It writes the workflow to a tmp CWL file, reads it, validates
          it and removes the tmp file again. By default, the workflow is written
          to file using absolute paths to the steps.