def get_oauth_client(server_token_url, client_id, client_secret):
 if (not is_valid_url(server_token_url)):
  return
 client = BackendApplicationClient(client_id=client_id)
 oauth_ccxcon = OAuth2Session(client=client)
 oauth_ccxcon.fetch_token(token_url=server_token_url, client_id=client_id, client_secret=client_secret, timeout=CCXCON_REQUEST_TIMEOUT)
 return oauth_ccxcon

def get_oauth_client ( server_token_url , client_id , client_secret ) : if ( not is_valid_url ( server_token_url ) ) : return client = BackendApplicationClient ( client_id = client_id ) oauth_ccxcon = OAuth2Session ( client = client ) oauth_ccxcon . fetch_token ( token_url = server_token_url , client_id = client_id , client_secret = client_secret , timeout = CCXCON_REQUEST_TIMEOUT ) return oauth_ccxcon
function that creates an oauth client and fetches a token .