code: def get_full_xml_representation(entity, private_key):
      
      from federation.entities.diaspora.mappers import get_outbound_entity
      diaspora_entity = get_outbound_entity(entity, private_key)
      xml = diaspora_entity.to_xml()
      return "<XML><post>%s</post></XML>" % etree.tostring(xml).decode("utf-8")
docs: Get full XML representation of an entity.
  
      This contains the <XML><post>..</post></XML> wrapper.
  
      Accepts either a Base entity or a Diaspora entity.
  
      Author `private_key` must be given so that certain entities can be signed.