def validate_api_key_and_source(api_key_in_headers, api_key_query_params):
 if ((not api_key_in_headers) and (not api_key_query_params)):
  LOG.audit('API key is not found in header or query parameters.')
  raise exceptions.ApiKeyNotProvidedError('API key is not provided.')
 if api_key_in_headers:
  LOG.audit('API key provided in headers')
 if api_key_query_params:
  LOG.audit('API key provided in query parameters')
 return validate_api_key((api_key_in_headers or api_key_query_params))

def validate_api_key_and_source ( api_key_in_headers , api_key_query_params ) : if ( ( not api_key_in_headers ) and ( not api_key_query_params ) ) : LOG . audit ( 'API key is not found in header or query parameters.' ) raise exceptions . ApiKeyNotProvidedError ( 'API key is not provided.' ) if api_key_in_headers : LOG . audit ( 'API key provided in headers' ) if api_key_query_params : LOG . audit ( 'API key provided in query parameters' ) return validate_api_key ( ( api_key_in_headers or api_key_query_params ) )
validate the provided api key .