def generate(self):
offsets = (<NUM_LIT:0.>, <NUM_LIT:0.>)<EOL>n_previous = <NUM_LIT:0><EOL>old_depth = sys.getrecursionlimit()<EOL>max_depth = old_depth if old_depth > self._max_rec_depth else self._max_rec_depth<EOL>sys.setrecursionlimit(max_depth)<EOL>if isinstance(self._obj, Neurite):<EOL><INDENT>max_diameter = _max_diameter(self._obj.root_node)<EOL>dummy_section = Tree()<EOL>dummy_section.add_child(self._obj.root_node)<EOL>self._generate_dendro(dummy_section, (max_diameter, <NUM_LIT:0.>), offsets)<EOL>self._groups.append((<NUM_LIT:0>, self._n))<EOL>self._dims.append(self._max_dims)<EOL><DEDENT>else:<EOL><INDENT>for neurite in self._obj.neurites:<EOL><INDENT>neurite = neurite.root_node<EOL>max_diameter = _max_diameter(neurite)<EOL>dummy_section = Tree()<EOL>dummy_section.add_child(neurite)<EOL>self._generate_dendro(dummy_section, (max_diameter, <NUM_LIT:0.>), offsets)<EOL>self._groups.append((n_previous, self._n))<EOL>self._dims.append(self._max_dims)<EOL>self._max_dims = [<NUM_LIT:0.>, <NUM_LIT:0.>]<EOL>n_previous = self._n<EOL><DEDENT><DEDENT>sys.setrecursionlimit(old_depth)<EOL>
Generate dendrogram