TST: #31922 assert no segmentation fault with numpy.array.__contains__
- [ ] closes #31922
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] new test cases

Could you merge master again? Should fix the CI failures thanks @ylin00  see comments on the issues. this appears to be failing on older numpies; its ok to skip those in the CI.