def _refresh_job(self):
        """If the last fetched job is not terminal, gets the job from the API."""
        if self._job['status'] not in self.TERMINAL_STATES:
            self._job = self._client.get_job(self.job_id())
If the last fetched job is not terminal, gets the job from the API.
cirq-ionq/cirq_ionq/job.py