Added python template match code