def find_scopes_for_services(service_names=None):
 result_scopes = []
 if (service_names is None):
  for (service_name, scopes) in AUTH_SCOPES.iteritems():
   result_scopes.extend(scopes)
 else:
  for service_name in service_names:
   result_scopes.extend(AUTH_SCOPES[service_name])
 return result_scopes

def find_scopes_for_services ( service_names = None ) : result_scopes = [ ] if ( service_names is None ) : for ( service_name , scopes ) in AUTH_SCOPES . iteritems ( ) : result_scopes . extend ( scopes ) else : for service_name in service_names : result_scopes . extend ( AUTH_SCOPES [ service_name ] ) return result_scopes
creates a combined list of scope urls for the desired services .