Create a :class:`Asset` from an XDR Asset object.

        :param asset_xdr_object: The XDR Asset object.

        :return: A new :class:`Asset` object from the given XDR Asset object.

def from_xdr_object(cls, asset_xdr_object):
        """Create a :class:`Asset` from an XDR Asset object.

        :param asset_xdr_object: The XDR Asset object.

        :return: A new :class:`Asset` object from the given XDR Asset object.
        """
        if asset_xdr_object.type == Xdr.const.ASSET_TYPE_NATIVE:
            return Asset.native()
        elif asset_xdr_object.type == Xdr.const.ASSET_TYPE_CREDIT_ALPHANUM4:
            issuer = encode_check(
                'account', asset_xdr_object.alphaNum4.issuer.ed25519).decode()
            code = asset_xdr_object.alphaNum4.assetCode.decode().rstrip('\x00')
        else:
            issuer = encode_check(
                'account',
                asset_xdr_object.alphaNum12.issuer.ed25519).decode()
            code = (
                asset_xdr_object.alphaNum12.assetCode.decode().rstrip('\x00'))
        return cls(code, issuer)