def _read_node_data(subnw, current_node, node_type, matcher, formatcode):
if node_type == "<STR_LIT>" or node_type == "<STR_LIT>":<EOL><INDENT>if node_type == "<STR_LIT>":<EOL><INDENT>node = current_node.add_child()<EOL><DEDENT>else:<EOL><INDENT>node = current_node<EOL><DEDENT><DEDENT>else:<EOL><INDENT>node = current_node<EOL><DEDENT>subnw = subnw.strip()<EOL>if not subnw and node_type == '<STR_LIT>' and formatcode != <NUM_LIT:100>:<EOL><INDENT>raise NewickError('<STR_LIT>')<EOL><DEDENT>elif not subnw:<EOL><INDENT>return<EOL><DEDENT>container1, container2, converterFn1, converterFn2, compiled_matcher = matcher[node_type]<EOL>data = re.match(compiled_matcher, subnw)<EOL>if data:<EOL><INDENT>data = data.groups()<EOL>if subnw and data[<NUM_LIT:0>] is None and data[<NUM_LIT:1>] is None and data[<NUM_LIT:2>] is None:<EOL><INDENT>raise NewickError("<STR_LIT>" %subnw)<EOL><DEDENT>if data[<NUM_LIT:0>] is not None and data[<NUM_LIT:0>] != '<STR_LIT>':<EOL><INDENT>node.add_feature(container1, converterFn1(data[<NUM_LIT:0>].strip()))<EOL><DEDENT>if data[<NUM_LIT:1>] is not None and data[<NUM_LIT:1>] != '<STR_LIT>':<EOL><INDENT>node.add_feature(container2, converterFn2(data[<NUM_LIT:1>][<NUM_LIT:1>:].strip()))<EOL><DEDENT>if data[<NUM_LIT:2>] is not Noneand data[<NUM_LIT:2>].startswith("<STR_LIT>"):<EOL><INDENT>_parse_extra_features(node, data[<NUM_LIT:2>])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise NewickError("<STR_LIT>" %subnw[<NUM_LIT:0>:<NUM_LIT:50>])<EOL><DEDENT>return<EOL>
Reads a leaf node from a subpart of the original newicktree