def retrieve_field_get_type(type_info: TypeInfo, private_field_name: str) -> Type: if not type_info.has_readable_member(private_field_name): return AnyType(TypeOfAny.explicit) sym = type_info.get(private_field_name) if sym and isinstance(sym.type, Instance): return sym.type return AnyType(TypeOfAny.explicit)