Add python snippet for log