Add Python implementations