code: def save_id_to_path_mapping(self):
      
      if not self.id_to_path_mapping:
        return
      with open(self.local_id_to_path_mapping_file, 'w') as f:
        writer = csv.writer(f)
        writer.writerow(['id', 'path'])
        for k, v in sorted(iteritems(self.id_to_path_mapping)):
          writer.writerow([k, v])
      cmd = ['gsutil', 'cp', self.local_id_to_path_mapping_file,
             os.path.join(self.target_dir, 'id_to_path_mapping.csv')]
      if subprocess.call(cmd) != 0:
        logging.error('Can\'t copy id_to_path_mapping.csv to target directory')
docs: Saves mapping from submission IDs to original filenames.
  
      This mapping is saved as CSV file into target directory.