def register(self, username="<STR_LIT>"):
if not username:<EOL><INDENT>username = utils.mxid2localpart(self.identity)<EOL><DEDENT>content = {<EOL>"<STR_LIT:type>": "<STR_LIT>",<EOL>"<STR_LIT:username>": username,<EOL>}<EOL>return self._send("<STR_LIT:POST>", "<STR_LIT>", content,<EOL>api_path=MATRIX_V2_API_PATH)<EOL>
Performs /register with type: m.login.application_service

        Args:
            username(str): Username to register.