'Return a file extension -> converted dataset encoded id map with all
the existing converted datasets associated with this instance.
This filters out deleted associations.'

def serialize_converted_datasets(self, dataset_assoc, key, **context):

    id_map = {}
    for converted in dataset_assoc.implicitly_converted_datasets:
        if ((not converted.deleted) and converted.dataset):
            id_map[converted.type] = self.serialize_id(converted.dataset, 'id')
    return id_map
