Leetcode Javascript Class Extends Python 3