code: def rowsBetween(self, start: int, end: int) -> "WindowSpec":
      if start <= Window._PRECEDING_THRESHOLD:
          start = Window.unboundedPreceding
      if end >= Window._FOLLOWING_THRESHOLD:
          end = Window.unboundedFollowing
  
      return WindowSpec(
          partitionSpec=self._partitionSpec,
          orderSpec=self._orderSpec,
          frame=WindowFrame(isRowFrame=True, start=start, end=end),
      )
  
imports: from pyspark.sql.connect.utils import check_dependencies
  import sys
  from typing import TYPE_CHECKING, Union, Sequence, List, Optional
  from pyspark.sql.connect.column import Column
  from pyspark.sql.connect.expressions import ColumnReference, Expression, SortOrder
  from pyspark.sql.connect.types import JVM_LONG_MIN, JVM_LONG_MAX
  from pyspark.sql.window import Window, WindowSpec
  from pyspark.errors import PySparkTypeError
label_desc: Use image node_id 4 for calling the WindowSpec obj's underlying member method code with example usage: obj.rowsBetween(start, end) and returns: WindowSpec