<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compose(self, type, data):
 """Compose text as a format. :param type: The unique name of the format :param data: The text to compose as the format """

        try:
            return self.registered_formats[type]['composer'](data)
        except KeyError:
            raise NotImplementedError("No composer found for "
                                      "type '{type}'".format(type=type))