add python equivalent