def normalize_tsv_results(self, tsv_data):
    """Sort .tsv file data so we can compare it with expected output."""
    lines_in = tsv_data.strip().split('\n')
    lines_out = []
    for line in lines_in:
      name, email, phone, snailmail = line.split('\t')
      lines_out.append('\t'.join(
          [name,
           '"%s"' % ','.join(sorted(email.strip('"').split(','))),
           '"%s"' % ','.join(sorted(phone.strip('"').split(','))),
           snailmail]))
    return '\n'.join(sorted(lines_out)) + '\n'
dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/examples/cookbook/mergecontacts_test.py/MergeContactsTest.normalize_tsv_results/original