async def dump_variant(obj, elem, elem_type=None, params=None, field_archiver=None):
field_archiver = field_archiver if field_archiver else dump_field<EOL>if isinstance(elem, x.VariantType) or elem_type.WRAPS_VALUE:<EOL><INDENT>return {<EOL>elem.variant_elem: await field_archiver(None, getattr(elem, elem.variant_elem), elem.variant_elem_type)<EOL>}<EOL><DEDENT>else:<EOL><INDENT>fdef = elem_type.find_fdef(elem_type.f_specs(), elem)<EOL>return {<EOL>fdef[<NUM_LIT:0>]: await field_archiver(None, elem, fdef[<NUM_LIT:1>])<EOL>}<EOL><DEDENT>
Transform variant to the popo object representation.

:param obj:
:param elem:
:param elem_type:
:param params:
:param field_archiver:
:return: