### How to find the dimension of Grobner basis

I have a set ~~$POLY$ ~~POLY of multivariate polynomials over integer. From this set, we can calculate Grobner basis as follows:

```
I=(POLY)*RING
I=Ideal(I)
B = I.groebner_basis()
```

where RING is the corresponding polynomial ring. I want to find the dimension of B as defined in https://en.wikipedia.org/wiki/Gr%C3%B6bner_basis#:~:text=The%20dimension%20is%20the%20maximal,is%20a%20power%20of%20x.

How to find that in ~~Sage? ~~Sage?