<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _set_token(self):
 """Set the Cerberus token based on auth type"""

        try:
            self.token = os.environ['CERBERUS_TOKEN']
            if self.verbose:
                print("Overriding Cerberus token with environment variable.", file=sys.stderr)
            logger.info("Overriding Cerberus token with environment variable.")
            return
        except:
            pass
        if self.username:
            ua = UserAuth(self.cerberus_url, self.username, self.password)
            self.token = ua.get_token()
        else:
            awsa = AWSAuth(self.cerberus_url, region=self.region, aws_session=self.aws_session, verbose=self.verbose)
            self.token = awsa.get_token()