def __init__(self, token):
        try:
            token = token.encode('US-ASCII')
        except __HOLE__:
            # token already byte string.
            pass
        # See RFC 2617.
        base64_user_pass = base64.b64encode(token + b':').decode('US-ASCII')
        
        self.headers = {
            'Authorization': 'Basic %s' % (base64_user_pass, )
        }
dataset/ETHPy150Open freshbooks/refreshbooks/refreshbooks/transport.py/TokenAuthorization.__init__