<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_attr(self, name, default=None, fail_silently=True):
 """try extra context """

        try:
            return getattr(self, name)
        except KeyError:
            extra_context = getattr(self, "extra_context")

            if name in extra_context:
                value = extra_context[name]

                if callable(value):
                    return value(request=None)

            return default