implement function and definition for python

Python用のやつです