def get_template_part(self, part, lang=None):
        templates = []
        # 1/ localized: mails/invitation_code/fr/
        localized = join('mails', self.template_name, lang or self.lang, part)
        templates.append(localized)

        # 2/ fallback: mails/invitation_code/
        fallback = join('mails', self.template_name, part)
        templates.append(fallback)

        # return the list of templates path candidates
        return templates
Return a mail part
dataset/ETHPy150Open novafloss/django-mail-factory/mail_factory/mails.py/BaseMail.get_template_part