class_docstr: Wrapper class for interacting with per-group state data in `applyInPandasWithState`.
code: def __init__(
      self,
      # JVM Constructor
      optionalValue: Row,
      batchProcessingTimeMs: int,
      eventTimeWatermarkMs: int,
      timeoutConf: str,
      hasTimedOut: bool,
      watermarkPresent: bool,
      # JVM internal state.
      defined: bool,
      updated: bool,
      removed: bool,
      timeoutTimestamp: int,
      # Python internal state.
      keyAsUnsafe: bytes,
      valueSchema: StructType,
  ) -> None:
      self._keyAsUnsafe = keyAsUnsafe
      self._value = optionalValue
      self._batch_processing_time_ms = batchProcessingTimeMs
      self._event_time_watermark_ms = eventTimeWatermarkMs
  
      assert timeoutConf in [
          GroupStateTimeout.NoTimeout,
          GroupStateTimeout.ProcessingTimeTimeout,
          GroupStateTimeout.EventTimeTimeout,
      ]
      self._timeout_conf = timeoutConf
  
      self._has_timed_out = hasTimedOut
      self._watermark_present = watermarkPresent
  
      self._defined = defined
      self._updated = updated
      self._removed = removed
      self._timeout_timestamp = timeoutTimestamp
      # Python internal state.
      self._old_timeout_timestamp = timeoutTimestamp
  
      self._value_schema = valueSchema
  
imports: import datetime
  import json
  from typing import Tuple, Optional
  from pyspark.sql.types import DateType, Row, StructType
  from pyspark.sql.utils import has_numpy
  from pyspark.errors import PySparkTypeError, PySparkValueError, PySparkRuntimeError
label_desc: Use image node_id 1 to create a new GroupState object  with example: obj = GroupState(optionalValue, batchProcessingTimeMs, eventTimeWatermarkMs, timeoutConf, hasTimedOut, watermarkPresent, defined, updated, removed, timeoutTimestamp, keyAsUnsafe, valueSchema)