class_docstr: gke job status
code: def from_job_info(cls, job_info: V1Job) -> "JobStatus":
      if job_info is None:
          return JobStatus.STATE_UNSPECIFIED
  
      if job_info.status is None:
          return JobStatus.STATE_UNSPECIFIED
  
      # completed
      if job_info.status.completion_time is not None:
          if job_info.status.succeeded is not None:
              if job_info.status.succeeded > 0:
                  return JobStatus.SUCCEEDED
              else:
                  return JobStatus.FAILED
  
      # active/pending
      if job_info.status.active is not None:
          if job_info.status.active > 0:
              return JobStatus.RUNNING
          else:
              return JobStatus.PENDING
  
      # unknown
      return JobStatus.STATE_UNSPECIFIED
  
file_path: caliban/caliban/platform/gke/types.py
imports: from enum import Enum
  from typing import NamedTuple, Optional
  from google.auth.credentials import Credentials
  from kubernetes.client import V1Job
label_desc: Use image node_id 2 for calling the JobStatus obj's underlying member method code with example usage: obj.from_job_info(cls, job_info) and returns: JobStatus, JobStatus, JobStatus, JobStatus, JobStatus, JobStatus, JobStatus