code: def compose(self, type, data):
          
          try:
              return self.registered_formats[type]['composer'](data)
          except KeyError:
              raise NotImplementedError("No composer found for "
                                        "type '{type}'".format(type=type))
docs: Compose text as a format.
  
          :param type: The unique name of the format
          :param data: The text to compose as the format