[Mask2Former] Add doc tests
# What does this PR do?

This PR ensures that the code snippet's in Mask2Former's docs work as intended, and are tested.
_The documentation is not available anymore as the PR was closed or merged._<|||||>@ydshieh not sure why CI is failing, running `make fixup` locally doesn't result in any updates. My version is black 22.3<|||||>@NielsRogge mine is also 22.03, but it reformates the modeling file. Not sure why though, do you want me to push? I can also post the whole content of `pip freeze` for you to check the package versions.<|||||>Feel free to push a commit :)<|||||>I pushed a commit. Actually, you are right. `make fixup` will change the files twice in the run, and that 2 changes cancel each other's change. I am not sure why. After running `make style` to fix some issues, it then works for `make fixup` too.