Fixes #140914
Imports TypeVar from typing_extensions alongside ParamSpec so both type parameters use the same default-sentinel machinery when another vendored typing_extensions copy has monkeypatched typing internals. This preserves the existing CachedMethod[P, RV] convention while avoiding the import-time TypeError.
Test Plan:
python3 -m py_compile torch/_inductor/utils.py/Users/dejain/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3minimized repro that loads a secondtyping_extensionscopy and definesCachedMethod(Protocol, Generic[P, RV])git diff --check
Pull Request resolved: #185708
Approved by: https://github.com/Skylion007, https://github.com/jansel
SOCIAL SHARE CARD GENERATOR