<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def text(self):
 """Formatted API declarations. Equivalent to the concatenation of `text` attributes of types, enums and commands in this Registry. """

        out = []
        out.extend(x.text for x in self.types.values())
        out.extend(x.text for x in self.enums.values())
        out.extend('extern {0};'.format(x.text)
                   for x in self.commands.values())
        return '\n'.join(out)