def getSRegNS(message):
 for sreg_ns_uri in [ns_uri_1_1, ns_uri_1_0]:
  alias = message.namespaces.getAlias(sreg_ns_uri)
  if (alias is not None):
   break
 else:
  sreg_ns_uri = ns_uri_1_1
  try:
   message.namespaces.addAlias(ns_uri_1_1, 'sreg')
  except KeyError as why:
   raise SRegNamespaceError(why[0])
 return sreg_ns_uri

def getSRegNS ( message ) : for sreg_ns_uri in [ ns_uri_1_1 , ns_uri_1_0 ] : alias = message . namespaces . getAlias ( sreg_ns_uri ) if ( alias is not None ) : break else : sreg_ns_uri = ns_uri_1_1 try : message . namespaces . addAlias ( ns_uri_1_1 , 'sreg' ) except KeyError as why : raise SRegNamespaceError ( why [ 0 ] ) return sreg_ns_uri
extract the simple registration namespace uri from the given openid message .