def build_send(self, entity: BaseEntity, from_user: UserType, to_user_key: RsaKey = None) -> Union[str, Dict]:
if entity.outbound_doc is not None:<EOL><INDENT>xml = entity.outbound_doc<EOL><DEDENT>else:<EOL><INDENT>xml = entity.to_xml()<EOL><DEDENT>me = MagicEnvelope(etree.tostring(xml), private_key=from_user.private_key, author_handle=from_user.handle)<EOL>rendered = me.render()<EOL>if to_user_key:<EOL><INDENT>return EncryptedPayload.encrypt(rendered, to_user_key)<EOL><DEDENT>return rendered<EOL>
Build POST data for sending out to remotes.

:param entity: The outbound ready entity for this protocol.
:param from_user: The user sending this payload. Must have ``private_key`` and ``id`` properties.
:param to_user_key: (Optional) Public key of user we're sending a private payload to.
:returns: dict or string depending on if private or public payload.