docs: def data_to_stream(self, data_element, stream):
          """
          Writes the given data element to the given stream.
          """
          generator = \
              self._make_representation_generator(stream, self.resource_class,
                                                  self._mapping)
          generator.run(data_element)