<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, model_alias, code='general', name=None, order=None, display_filter=None):
 """ Update given tab :param model_alias: :param code: :param name: :param order: :param display_filter: :return: """

        model_alias = self.get_model_alias(model_alias)
        for item in self.tabs[model_alias]:
            if item.code != code:
                continue
            if name:
                item.name = name
            if order:
                item.order = order
            if display_filter:
                item.display_filter = display_filter
            break
        self.tabs[model_alias] = sorted(self.tabs[model_alias], key=lambda item: item.code if item.code else 999)