<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extra_context(self):
 """Add site_name to context """

        from django.conf import settings

        return {
            "site_name": (lambda r: settings.LEONARDO_SITE_NAME
                          if getattr(settings, 'LEONARDO_SITE_NAME', '') != ''
                          else settings.SITE_NAME),
            "debug": lambda r: settings.TEMPLATE_DEBUG
        }