i have a dataframe:

```
from pyspark.sql import SparkSession
spark = SparkSession.builder.appName('').getOrCreate()
df = spark.createDataFrame([("a", "65"), ("b", "23"),("c", "65"), ("d", "23"),
("a", "66"), ("b", "46"),("c", "23"), ("d", "66"),
("b", "5"), ("b", "3"),("c", "3")], ["column2", "value"])
df.show()
+-------+-----+
|column2|value|
+-------+-----+
| a| 65 |
| b| 23 |
| c| 65 |
| d| 23 |
| a| 66 |
| b| 46 |
| c| 23 |
| d| 66 |
| b| 5 |
| b| 3 |
| c| 3 |
+-------+-----+
```

And I wanted to make each 4 row as an one group. Then regarding to that group create new column where i can assign the number of groups to the corresponding rows. So the desired output is as following:

```
+-------+-----+------+
|column2|value|gr_val|
+-------+-----+ -----+
| a| 65 | 1 |
| b| 23 | 1 |
| c| 65 | 1 |
| d| 23 | 1 |
| a| 66 | 2 |
| b| 46 | 2 |
| c| 23 | 2 |
| d| 66 | 2 |
| b| 5 | 3 |
| b| 3 | 3 |
| c| 3 | 3 |
+-------+-----+------+
```

I would appreciate any helps!