code: def check(self, item_id):
          
          response = self._request("/submission/sample/{sample_id}".format(sample_id=item_id), headers=self.headers)
  
          if response.status_code == 404:
              # unknown id
              return False
  
          try:
              finished = False
              for submission in response.json()['data']:
                  finished = finished or submission['submission_finished']
              if finished:
                  return True
  
          except (ValueError, KeyError) as e:
              raise sandboxapi.SandboxError(e)
  
          return False
docs: Check if an analysis is complete.
  
          :type  item_id: str
          :param item_id: File ID to check.
  
          :rtype:  bool
          :return: Boolean indicating if a report is done or not.