python based sorted and deidentification