What is the meaning of "did time"?

What is the meaning of "did time" in this context?

Then my heart did time in Siberia.


More context:

When you come back I won't be here
She said and gently pulled me near
If you want to talk you can call
And no it's not your fault

I just smiled and said let go of me
But there's something that I've just got to know
Did someone else steal my part?
She said it's not my fault

Then my heart did time in Siberia
Was waiting for the lie to come true
Because it's all so dark and mysterious
When the one you want doesn't want you too


When you come back I won't be here
She said and gently pulled me near
If you want to talk you can call
And no it's not your fault

I just smiled and said let go of me
But there's something that I've just got to know
Did someone else steal my part?
She said it's not my fault

Then my heart did time in Siberia
Was waiting for the lie to come true
Because it's all so dark and mysterious
When the one you want doesn't want you too

Siberia was the location for several prison camps (gulags) in the USSR. It is largely uninhabited and desolate. According to Wikipedia, the population density of Siberia is about 8 people per square mile. It is heavily forested and most of the people who make Siberia their home are disconnected from the rest of the world.

Then my heart did time in Siberia
Was waiting for the lie to come true

The lyricist is painting this picture of the heart going into isolation and doing so in a manner much more extreme than by sulking in a corner. It's not necessary that the heart went to prison, only that it went to a vast, desolate place where it would be nigh impossible for anyone to find until it wanted to be found.