def get_template_part(self, part, lang=None):
        """Return a mail part

          * subject.txt
          * body.txt
          * body.html

        Try in order:

        1/ localized: mails/{{ template_name }}/fr/
        2/ fallback:  mails/{{ template_name }}/

        """
        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
dataset/ETHPy150Open novafloss/django-mail-factory/mail_factory/mails.py/BaseMail.get_template_part/original