Get complete layout for given object

def get_layout(self, object):
        """Get complete layout for given object"""
        layout = self.create_layout(object)
        if isinstance(layout, Component):
            layout = Layout(layout)

        if isinstance(layout, list):
            layout = Layout(*layout)

        for update_layout in self.layout_updates:
            update_layout(layout, object)
        layout.set_object(object)
        return layout