code: def _refresh_state(self):
      
      if self._is_complete:
        return
  
      if not self._future:
        raise Exception('Please implement this in the derived class')
  
      if self._future.done():
        self._is_complete = True
        self._end_time = datetime.datetime.utcnow()
        try:
          self._result = self._future.result()
        except Exception as e:
          message = str(e)
          self._fatal_error = JobError(location=traceback.format_exc(), message=message,
                                       reason=str(type(e)))
docs: Get the state of a job. Must be overridden by derived Job classes
          for Jobs that don't use a Future.