code: def generate_http_basic_token(username, password):
      
      token = base64.b64encode('{}:{}'.format(username, password).encode('utf-8')).decode('utf-8')
      return token
docs: Generates a HTTP basic token from username and password
  
      Returns a token string (not a byte)