Dumps blob message to the writer.
        Supports both blob and raw value.

        :param writer:
        :param elem:
        :param elem_type:
        :param params:
        :return:

async def blob_dump(self, elem, elem_type, params=None):
        """
        Dumps blob message to the writer.
        Supports both blob and raw value.

        :param writer:
        :param elem:
        :param elem_type:
        :param params:
        :return:
        """
        elem_is_blob = isinstance(elem, x.BlobType)
        elem_params = elem if elem_is_blob or elem_type is None else elem_type
        data = getattr(elem, x.BlobType.DATA_ATTR) if elem_is_blob else elem

        if len(data) != elem_params.SIZE:
            raise ValueError('Fixed size blob has not defined size: %s, path %s' % (elem_params.SIZE, self.tracker))

        await dump_uvarint(self.iobj, len(elem))
        await self.iobj.awrite(data)