code: def getOPOrUserServices(openid_services):
      op_services = arrangeByType(openid_services, [OPENID_IDP_2_0_TYPE])
      openid_services = arrangeByType(openid_services,
                                      OpenIDServiceEndpoint.openid_type_uris)
      return op_services or openid_services