BUG: Changing return is_named_tuble to a tuple sublclass #40682
- [ ] closes #40682
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

Changed pandas/core/dtypes/inference.py so that the return of the is_named_tuple function to be a tuple subclass so that it is compatible with sqlalchemy.

Passed test_inference.py