How to fix NameError: name 'X' is not defined (in get_type_hints) in Python | DevErrors