def add_aux_anodes(self, new_anodes): "Add an auxiliary a-node/a-nodes to the list." # get the original anodes and set the union if self.aux_anodes: self.aux_anodes = self.aux_anodes + as_list(new_anodes) else: self.aux_anodes = as_list(new_anodes)
def get_referenced_ids(self): """Return all ids referenced by this node, keyed under their reference types in a hash.""" ret = {'alignment': []} for align in self.alignment: ret['alignment'].add(align['counterpart.rf']) for attr in self.get_ref_attr_list(): value = self.get_attr(attr) if not value: continue ret[attr] = as_list(value) return ret