Random pause

Hello forum! I´m new and I´m trying to learn how to code in python with a microbit.
I have made a LED blink with this code:

def on_forever():
pins.digital_write_pin(DigitalPin.P1, 1)
basic.pause(1000)
pins.digital_write_pin(DigitalPin.P1, 0)
basic.pause(1000)
basic.forever(on_forever)

BUT, I would like to have the pauses random between, lets say, 1000 and 6000.
Can anyone help me out on this?

I found out how to fix it with blocks in makecode. Now it looks like this:

def on_forever():
pins.digital_write_pin(DigitalPin.P1, 1)
basic.pause(1000)
pins.digital_write_pin(DigitalPin.P1, 0)
basic.pause(randint(1000, 5000))
basic.forever(on_forever)