docs: def _check_job_status(self, job, desc, status_key_name):
          """Check to see if the job completed successfully and, if not, construct and
          raise a ValueError.
  
          Args:
              job (str): The name of the job to check.
              desc (dict[str, str]): The result of ``describe_training_job()``.
              status_key_name (str): Status key name to check for.
  
          Raises:
              ValueError: If the training job fails.
          """
          status = desc[status_key_name]
          # If the status is capital case, then convert it to Camel case
          status = _STATUS_CODE_TABLE.get(status, status)
  
          if status != 'Completed' and status != 'Stopped':
              reason = desc.get('FailureReason', '(No reason provided)')
              job_type = status_key_name.replace('JobStatus', ' job')
              raise ValueError('Error for {} {}: {} Reason: {}'.format(job_type, job, status, reason))