async def load_field(obj, elem_type, params=None, elem=None):
if issubclass(elem_type, x.UVarintType) or issubclass(elem_type, x.IntType) or isinstance(obj, (int, bool)):<EOL><INDENT>return set_elem(elem, obj)<EOL><DEDENT>elif issubclass(elem_type, x.BlobType):<EOL><INDENT>fvalue = await load_blob(obj, elem_type)<EOL>return set_elem(elem, fvalue)<EOL><DEDENT>elif issubclass(elem_type, x.UnicodeType) or isinstance(elem, str):<EOL><INDENT>return set_elem(elem, obj)<EOL><DEDENT>elif issubclass(elem_type, x.VariantType):<EOL><INDENT>fvalue = await load_variant(obj, elem=get_elem(elem), elem_type=elem_type, params=params)<EOL>return set_elem(elem, fvalue)<EOL><DEDENT>elif issubclass(elem_type, x.ContainerType):  <EOL><INDENT>fvalue = await load_container(obj, elem_type, params=params, container=get_elem(elem))<EOL>return set_elem(elem, fvalue)<EOL><DEDENT>elif issubclass(elem_type, x.MessageType):<EOL><INDENT>fvalue = await load_message(obj, msg_type=elem_type, msg=get_elem(elem))<EOL>return set_elem(elem, fvalue)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError<EOL><DEDENT>
Loads a field from the reader, based on the field type specification. Demultiplexer.

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