async def get_element_size(self, elem_type, elem=None, params=None):
if hasattr(elem_type, '<STR_LIT>'):<EOL><INDENT>elem = elem_type() if elem is None else elem<EOL>return await elem.blob_size(self)<EOL><DEDENT>if issubclass(elem_type, x.UVarintType):<EOL><INDENT>raise helpers.ArchiveException('<STR_LIT>')<EOL><DEDENT>elif issubclass(elem_type, x.IntType):<EOL><INDENT>return elem_type.WIDTH<EOL><DEDENT>elif issubclass(elem_type, x.BlobType):<EOL><INDENT>if elem is not None:<EOL><INDENT>return len(elem)<EOL><DEDENT>if not elem_type.FIX_SIZE:<EOL><INDENT>raise helpers.ArchiveException('<STR_LIT>')<EOL><DEDENT>return elem_type.SIZE<EOL><DEDENT>elif issubclass(elem_type, x.UnicodeType):<EOL><INDENT>raise helpers.ArchiveException('<STR_LIT>')<EOL><DEDENT>elif issubclass(elem_type, x.VariantType):<EOL><INDENT>raise helpers.ArchiveException('<STR_LIT>')<EOL><DEDENT>elif issubclass(elem_type, x.ContainerType):  <EOL><INDENT>celem_type = x.container_elem_type(elem_type, params)<EOL>if elem is not None:<EOL><INDENT>return len(elem) * await self.get_element_size(elem_type=celem_type, elem=elem[<NUM_LIT:0>] if len(elem) > <NUM_LIT:0> else None)<EOL><DEDENT>if not elem_type.FIX_SIZE:<EOL><INDENT>raise helpers.ArchiveException('<STR_LIT>')<EOL><DEDENT>return elem_type.SIZE * await self.get_element_size(elem_type=celem_type)<EOL><DEDENT>elif issubclass(elem_type, x.TupleType):  <EOL><INDENT>acc = <NUM_LIT:0><EOL>for t in elem_type.f_specs():<EOL><INDENT>acc += await self.get_element_size(t)<EOL><DEDENT>return acc<EOL><DEDENT>elif issubclass(elem_type, x.MessageType):<EOL><INDENT>acc = <NUM_LIT:0><EOL>for t in elem_type.f_specs():<EOL><INDENT>acc += await self.get_element_size(t[<NUM_LIT:1>], params=t[<NUM_LIT:2>:])<EOL><DEDENT>return acc<EOL><DEDENT>else:<EOL><INDENT>raise TypeError<EOL><DEDENT>
Determines element size after blob serialization.
Can be quite tricky for complicated structures - another object required to implement sizeof()

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