def _populate_struct_type_attributes(self, env, data_type):
parent_type = None<EOL>extends = data_type._ast_node.extends<EOL>if extends:<EOL><INDENT>parent_type = self._resolve_type(env, extends, True)<EOL>if isinstance(parent_type, Alias):<EOL><INDENT>raise InvalidSpec(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>data_type._ast_node.lineno, data_type._ast_node.path)<EOL><DEDENT>if isinstance(parent_type, Nullable):<EOL><INDENT>raise InvalidSpec(<EOL>'<STR_LIT>',<EOL>data_type._ast_node.lineno, data_type._ast_node.path)<EOL><DEDENT>if not isinstance(parent_type, Struct):<EOL><INDENT>raise InvalidSpec(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % quote(parent_type.name),<EOL>data_type._ast_node.lineno, data_type._ast_node.path)<EOL><DEDENT><DEDENT>api_type_fields = []<EOL>for stone_field in data_type._ast_node.fields:<EOL><INDENT>api_type_field = self._create_struct_field(env, stone_field)<EOL>api_type_fields.append(api_type_field)<EOL><DEDENT>data_type.set_attributes(<EOL>data_type._ast_node.doc, api_type_fields, parent_type)<EOL>
Converts a forward reference of a struct into a complete definition.