def as_bytes(self) -> bytes:
logger = logging.getLogger(__name__)<EOL>logger.debug("<STR_LIT>", self)<EOL>xbytes = POINTER(c_ubyte)()<EOL>xbytes_len = c_size_t()<EOL>do_call(self.as_bytes_handler, self.c_instance, byref(xbytes), byref(xbytes_len))<EOL>res = bytes(xbytes[:xbytes_len.value])<EOL>logger.debug("<STR_LIT>", res)<EOL>return res<EOL>
Returns BLS entity bytes representation.
:return: BLS entity bytes representation