$def with (change) $ primary = change.get_master() $ type = primary.type.key.replace("/type/","") $ label = primary.name if type == "author" else primary.title $if primary: