code: def from_api(value: str) -> "RunState":
      if value == RunState._api_active.value:
          return RunState.active
      elif value == RunState._api_inactive.value:
          return RunState.inactive
      else:
          raise NeptuneException(f"Unknown RunState: {value}")
  
imports: import enum
  from neptune.common.exceptions import NeptuneException
label_desc: Use image node_id 2 for calling the RunState obj's underlying member method code with example usage: obj.from_api(value) and returns: RunState, RunState