class_docstr: The state of a job for a given input.
code: def __post_init__(self) -> None:
      self.valid_pending_jobs_df = self.pending_jobs_df.sort_values(
          ["status", "priority", "created_at"],
          ascending=[False, False, True],
      ).head(1)
      # ^ only keep the first valid job, if any, in order of priority
      self.is_in_process = not self.valid_pending_jobs_df.empty
  
imports: import logging
  from dataclasses import dataclass, field
  from typing import Optional
  import pandas
  from libcommon.constants import CONFIG_SPLIT_NAMES_KINDS, DATASET_CONFIG_NAMES_KINDS, ERROR_CODES_TO_RETRY, MAX_FAILED_RUNS
  from libcommon.processing_graph import Artifact, ProcessingGraph
  from libcommon.prometheus import StepProfiler
  from libcommon.simple_cache import CacheEntryMetadata, fetch_names
label_desc: Use image node_id 1 for calling the JobState obj's underlying member method code with example usage: obj.__post_init__() without return types