def _get_features_string(self, features=None):
string = "<STR_LIT>"<EOL>if features is None:<EOL><INDENT>features = []<EOL><DEDENT>elif features == []:<EOL><INDENT>features = self.features<EOL><DEDENT>for pr in features:<EOL><INDENT>if hasattr(self, pr):<EOL><INDENT>raw = getattr(self, pr)<EOL>if type(raw) in ITERABLE_TYPES:<EOL><INDENT>raw = '<STR_LIT:|>'.join([str(i) for i in raw])<EOL><DEDENT>elif type(raw) == dict:<EOL><INDENT>raw = '<STR_LIT:|>'.join(<EOL>map(lambda x,y: "<STR_LIT>" %(x, y), six.iteritems(raw)))<EOL><DEDENT>elif type(raw) == str:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raw = str(raw)<EOL><DEDENT>value = re.sub("<STR_LIT:[>"+_ILEGAL_NEWICK_CHARS+"<STR_LIT:]>", "<STR_LIT:_>",raw)<EOL>if string != "<STR_LIT>":<EOL><INDENT>string +="<STR_LIT::>"<EOL><DEDENT>string +="<STR_LIT>"  %(pr, str(value))<EOL><DEDENT><DEDENT>if string != "<STR_LIT>":<EOL><INDENT>string = "<STR_LIT>"+string+"<STR_LIT:]>"<EOL><DEDENT>return string<EOL>
Generates the extended newick string NHX with extra data about a node.