def __get_state_by_id(cls, job_id):
    """Get job state by id.

    Args:
      job_id: job id.

    Returns:
      model.MapreduceState for the job.

    Raises:
      ValueError: if the job state is missing.
    """
    state = model.MapreduceState.get_by_job_id(job_id)
    if state is None:
      raise ValueError("Job state for job %s is missing." % job_id)
    return state
def __get_state_by_id ( cls , job_id ) : state = model . MapreduceState . get_by_job_id ( job_id ) if state is None : raise ValueError ( "Job state for job %s is missing." % job_id ) return state
Get job state by id.

    Args:
      job_id: job id.

    Returns:
      model.MapreduceState for the job.

    Raises:
      ValueError: if the job state is missing.