Update python code. Use my own _sgn() function.