def encode_bytes(obj, nsprefix=None):
node = encode_xml(obj, nsprefix)<EOL>return etree.tostring(node)<EOL>
Encodes an OpenMath element into a string.

    :param obj: Object to encode as string.
    :type obj: OMAny

    :rtype: bytes