Loads variant type from the reader.
        Supports both wrapped and raw variant.

        :param elem_type:
        :param params:
        :param elem:
        :param wrapped:
        :param obj:
        :return:

async def load_variant(self, elem_type, params=None, elem=None, wrapped=None, obj=None):
        """
        Loads variant type from the reader.
        Supports both wrapped and raw variant.

        :param elem_type:
        :param params:
        :param elem:
        :param wrapped:
        :param obj:
        :return:
        """
        is_wrapped = elem_type.WRAPS_VALUE if wrapped is None else wrapped

        if is_wrapped:
            elem = elem_type() if elem is None else elem

        fname = list(obj.keys())[0]
        for field in elem_type.f_specs():
            if field[0] != fname:
                continue

            try:
                self.tracker.push_variant(field[1])
                fvalue = await self._load_field(field[1], field[2:], elem if not is_wrapped else None, obj=obj[fname])
                self.tracker.pop()

            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e

            if is_wrapped:
                elem.set_variant(field[0], fvalue)

            return elem if is_wrapped else fvalue
        raise ValueError('Unknown tag: %s' % fname)