class_docstr: Some of the most frequently encountered slurm job statuses.
code: def from_string(cls, state: str):
      if state == "running":
          return cls.RUNNING
      if state == "pending":
          return cls.PENDING
      if state == "completed":
          return cls.COMPLETED
      if state == "failed":
          return cls.FAILED
      if state == "cancelled":
          return cls.CANCELLED
      return cls.UNKNOWN
  
imports: import enum
  import importlib
  import os
  import pickle
  import re
  import subprocess
  import sys
  import tempfile
  import time
  from dataclasses import dataclass, field
  from functools import partial
  from typing import Any, Callable, Dict, List, Tuple, Union
label_desc: Use image node_id 1 for calling the SlurmJobState obj's underlying member method code with example usage: obj.from_string(cls, state) and returns: cls, cls, cls, cls, cls, cls