[Docs] Fix gen_schema_reference.py on Python 3.10
#3883
Merged
gen_schema_reference.py on Python 3.10
#3883