def normalize_scopes(scopes):
 all_scopes = set()
 for sc in scopes:
  try:
   scope_tuple = public_scopes[sc]
   all_scopes |= scope_tuple.parts
  except KeyError:
   pass
 return all_scopes

def normalize_scopes ( scopes ) : all_scopes = set ( ) for sc in scopes : try : scope_tuple = public_scopes [ sc ] all_scopes |= scope_tuple . parts except KeyError : pass return all_scopes
given a list of public-facing scope names from a cas token .