<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def override_default_templates(self):
 """ Override the default emails already defined by other apps """

        if plugs_mail_settings['OVERRIDE_TEMPLATE_DIR']:
            dir_ = plugs_mail_settings['OVERRIDE_TEMPLATE_DIR']
            for file_ in os.listdir(dir_):
                if file_.endswith(('.html', 'txt')):
                    self.overrides[file_] = dir_