def findOPLocalIdentifier(service_element, type_uris):
 local_id_tags = []
 if ((OPENID_1_1_TYPE in type_uris) or (OPENID_1_0_TYPE in type_uris)):
  local_id_tags.append(nsTag(OPENID_1_0_NS, 'Delegate'))
 if (OPENID_2_0_TYPE in type_uris):
  local_id_tags.append(nsTag(XRD_NS_2_0, 'LocalID'))
 local_id = None
 for local_id_tag in local_id_tags:
  for local_id_element in service_element.findall(local_id_tag):
   if (local_id is None):
    local_id = local_id_element.text
   elif (local_id != local_id_element.text):
    format = 'More than one %r tag found in one service element'
    message = (format % (local_id_tag,))
    raise DiscoveryFailure(message, None)
 return local_id

def findOPLocalIdentifier ( service_element , type_uris ) : local_id_tags = [ ] if ( ( OPENID_1_1_TYPE in type_uris ) or ( OPENID_1_0_TYPE in type_uris ) ) : local_id_tags . append ( nsTag ( OPENID_1_0_NS , 'Delegate' ) ) if ( OPENID_2_0_TYPE in type_uris ) : local_id_tags . append ( nsTag ( XRD_NS_2_0 , 'LocalID' ) ) local_id = None for local_id_tag in local_id_tags : for local_id_element in service_element . findall ( local_id_tag ) : if ( local_id is None ) : local_id = local_id_element . text elif ( local_id != local_id_element . text ) : format = 'More than one %r tag found in one service element' message = ( format % ( local_id_tag , ) ) raise DiscoveryFailure ( message , None ) return local_id
find the op-local identifier for this xrd:service element .