code: def getStatus(jobStoreName):
          
          try:
              jobstore = Toil.resumeJobStore(jobStoreName)
          except NoSuchJobStoreException:
              return 'QUEUED'
          except NoSuchFileException:
              return 'QUEUED'
  
          try:
              with jobstore.readSharedFileStream('succeeded.log') as successful:
                  pass
              return 'COMPLETED'
          except NoSuchFileException:
              try:
                  with jobstore.readSharedFileStream('failed.log') as failed:
                      pass
                  return 'ERROR'
              except NoSuchFileException:
                  pass
          return 'RUNNING'
docs: Determine the status of a workflow.
  
          If the jobstore does not exist, this returns 'QUEUED', assuming it has not been created yet.
  
          Checks for the existence of files created in the toil.Leader.run(). In toil.Leader.run(), if a workflow completes
          with failed jobs, 'failed.log' is created, otherwise 'succeeded.log' is written. If neither of these exist,
          the leader is still running jobs.
  
          :return: A string indicating the status of the workflow. ['COMPLETED', 'RUNNING', 'ERROR', 'QUEUED']
          :rtype: str