def filter(self, *LayoutClasses, **kwargs):
self._check_layout()<EOL>max_level = kwargs.pop('<STR_LIT>', <NUM_LIT:0>)<EOL>greedy = kwargs.pop('<STR_LIT>', False)<EOL>filtered_layout_objects = self.layout.get_layout_objects(LayoutClasses, max_level=max_level, greedy=greedy)<EOL>return LayoutSlice(self.layout, filtered_layout_objects)<EOL>
Returns a LayoutSlice pointing to layout objects of type `LayoutClass`