class_docstr: This class represents stateful part of the specific policy.
code: def __init__(self, policy: RetryPolicy):
      self._policy = policy
  
      # Will allow attempts [0, self._policy.max_retries)
      self._attempt = 0
      self._next_wait: float = self._policy.initial_backoff
  
imports: import grpc
  import random
  import time
  import typing
  from typing import Optional, Callable, Generator, List, Type
  from types import TracebackType
  from pyspark.sql.connect.client.logging import logger
  from pyspark.errors import PySparkRuntimeError, RetriesExceeded
label_desc: Use image node_id 1 to create a new RetryPolicyState object  with example: obj = RetryPolicyState(policy)