def METHOD_NAME(self, status):
    session = self.application.new_session()
    event_manager = session.get_service("event_manager")
    element_factory = session.get_service("element_factory")
    auto_layout = session.get_service("auto_layout")
    with Transaction(event_manager):
        diagram = element_factory.create(Diagram)
    auto_layout.layout(diagram)
    status.complete()