<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def defaults(self):
 """ Return a nested dicionary of all registered factory defaults. """

        return {
            key: get_defaults(value)
            for key, value in self.all.items()
        }