def get_parts(self, parts=None, reference_level=<NUM_LIT:0>):
if parts is None:<EOL><INDENT>parts = list()<EOL>new_reference_level = reference_level<EOL><DEDENT>else:<EOL><INDENT>self._level_in_section = self._level + reference_level<EOL>new_reference_level = self._level_in_section<EOL>parts.append(self.my_osid_object)<EOL><DEDENT>if self._child_parts is None:<EOL><INDENT>if self.has_magic_children():<EOL><INDENT>self.generate_children()<EOL><DEDENT>else:<EOL><INDENT>return parts<EOL><DEDENT><DEDENT>for part in self._child_parts:<EOL><INDENT>part.get_parts(parts, new_reference_level)<EOL><DEDENT>return parts<EOL>
Recursively returns a depth-first list of all known magic parts