def __unicode__(self):
<EOL>if not self.generated:<EOL><INDENT>if not self.alias and self.grapheme in self.ts.sounds:<EOL><INDENT>return self.grapheme<EOL><DEDENT>elif self.alias and self.featureset in self.ts.features:<EOL><INDENT>return text_type(self.ts.features[self.featureset])<EOL><DEDENT>raise ValueError(<EOL>'<STR_LIT>'.format(self.grapheme))  <EOL><DEDENT>elements = [f for f in self._features() if f not in EXCLUDE_FEATURES] + [self.type]<EOL>base_str = self.base or '<STR_LIT>'<EOL>base_graphemes = []<EOL>while elements:<EOL><INDENT>base = self.ts.features.get(frozenset(elements))<EOL>if base:<EOL><INDENT>base_graphemes.append(base.grapheme)<EOL><DEDENT>elements.pop(<NUM_LIT:0>)<EOL><DEDENT>base_str = base_graphemes[-<NUM_LIT:1>] if base_graphemes else base_str or '<STR_LIT>'<EOL>base_vals = {<EOL>self.ts._feature_values[elm] for elm in<EOL>self.ts.sounds[base_str].name.split('<STR_LIT:U+0020>')[:-<NUM_LIT:1>]} ifbase_str != '<STR_LIT>' else {}<EOL>out = []<EOL>for p in self._write_order['<STR_LIT>']:<EOL><INDENT>if p not in base_vals and getattr(self, p, '<STR_LIT>') in self._features():<EOL><INDENT>out.append(<EOL>norm(self.ts.features[self.type].get(getattr(self, p, '<STR_LIT>'), '<STR_LIT>')))<EOL><DEDENT><DEDENT>out.append(base_str)<EOL>for p in self._write_order['<STR_LIT>']:<EOL><INDENT>if p not in base_vals and getattr(self, p, '<STR_LIT>') in self._features():<EOL><INDENT>out.append(<EOL>norm(self.ts.features[self.type].get(getattr(self, p, '<STR_LIT>'), '<STR_LIT>')))<EOL><DEDENT><DEDENT>return '<STR_LIT>'.join(out)<EOL>
Return the reference representation of the sound.

Note
----
We first try to return the non-alias value in our data. If this fails,
we create the sound based on it's feature representation.