async def set_active(self):
is_active = (self._active_client_state ==<EOL>hangouts_pb2.ACTIVE_CLIENT_STATE_IS_ACTIVE)<EOL>timed_out = (time.time() - self._last_active_secs ><EOL>SETACTIVECLIENT_LIMIT_SECS)<EOL>if not is_active or timed_out:<EOL><INDENT>self._active_client_state = (<EOL>hangouts_pb2.ACTIVE_CLIENT_STATE_IS_ACTIVE<EOL>)<EOL>self._last_active_secs = time.time()<EOL>if self._email is None:<EOL><INDENT>try:<EOL><INDENT>get_self_info_request = hangouts_pb2.GetSelfInfoRequest(<EOL>request_header=self.get_request_header(),<EOL>)<EOL>get_self_info_response = await self.get_self_info(<EOL>get_self_info_request<EOL>)<EOL><DEDENT>except exceptions.NetworkError as e:<EOL><INDENT>logger.warning('<STR_LIT>'<EOL>.format(e))<EOL>return<EOL><DEDENT>self._email = (<EOL>get_self_info_response.self_entity.properties.email[<NUM_LIT:0>]<EOL>)<EOL><DEDENT>if self._client_id is None:<EOL><INDENT>logger.info(<EOL>'<STR_LIT>'<EOL>)<EOL>return<EOL><DEDENT>try:<EOL><INDENT>set_active_request = hangouts_pb2.SetActiveClientRequest(<EOL>request_header=self.get_request_header(),<EOL>is_active=True,<EOL>full_jid="<STR_LIT>".format(self._email, self._client_id),<EOL>timeout_secs=ACTIVE_TIMEOUT_SECS,<EOL>)<EOL>await self.set_active_client(set_active_request)<EOL><DEDENT>except exceptions.NetworkError as e:<EOL><INDENT>logger.warning('<STR_LIT>'.format(e))<EOL><DEDENT>else:<EOL><INDENT>logger.info('<STR_LIT>'<EOL>.format(ACTIVE_TIMEOUT_SECS))<EOL><DEDENT><DEDENT>
Set this client as active.

        While a client is active, no other clients will raise notifications.
        Call this method whenever there is an indication the user is
        interacting with this client. This method may be called very
        frequently, and it will only make a request when necessary.