<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_tab(self, model_alias, object, tab_code):
 """ Get tab for given object and tab code :param model_alias: :param object: Object used to render tab :param tab_code: Tab code to use :return: """

        model_alias = self.get_model_alias(model_alias)
        for item in self.tabs[model_alias]:
            if item.code == tab_code and item.display_filter(object):
                return item
        raise Exception('Given tab does not exits or is filtered')