def determine_struct_tree_subtype(self, data_type, obj):
if '<STR_LIT>' not in obj:<EOL><INDENT>raise bv.ValidationError("<STR_LIT>")<EOL><DEDENT>if not isinstance(obj['<STR_LIT>'], six.string_types):<EOL><INDENT>raise bv.ValidationError('<STR_LIT>' %<EOL>bv.generic_type_name(obj['<STR_LIT>']),<EOL>parent='<STR_LIT>')<EOL><DEDENT>full_tags_tuple = (obj['<STR_LIT>'],)<EOL>if full_tags_tuple in data_type.definition._tag_to_subtype_:<EOL><INDENT>subtype = data_type.definition._tag_to_subtype_[full_tags_tuple]<EOL>if isinstance(subtype, bv.StructTree):<EOL><INDENT>raise bv.ValidationError("<STR_LIT>" %<EOL>('<STR_LIT:.>'.join(full_tags_tuple)))<EOL><DEDENT>return subtype<EOL><DEDENT>else:<EOL><INDENT>if self.strict:<EOL><INDENT>raise bv.ValidationError("<STR_LIT>" %<EOL>'<STR_LIT:.>'.join(full_tags_tuple))<EOL><DEDENT>else:<EOL><INDENT>if data_type.definition._is_catch_all_:<EOL><INDENT>return data_type<EOL><DEDENT>else:<EOL><INDENT>raise bv.ValidationError(<EOL>"<STR_LIT>" %<EOL>('<STR_LIT:.>'.join(full_tags_tuple), data_type.definition.__name__))<EOL><DEDENT><DEDENT><DEDENT>
Searches through the JSON-object-compatible dict using the data type
definition to determine which of the enumerated subtypes `obj` is.