Update socode.py

added my own function