I think, you could just use a class variable here, like
```python
class SVGFigure(object):
    maxid = 0
    def __init__(..):
```