Java Generics Class Example In Python Code For Snake