foobar.removesuffix('=').removesuffix('=')
would work right now in 3.9 (I think).
Can confirm:
```
>>> 'abc==='.removesuffix('=').removesuffix('=')
'abc='
>>> 'abc=='.removesuffix('=').removesuffix('=')
'abc'
>>> 'abc='.removesuffix('=').removesuffix('=')
'abc'
>>> 'abc'.removesuffix('=').removesuffix('=')
'abc'
```