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
docs: Extract OP Identifier services.  If none found, return the
      rest, sorted with most preferred first according to
      OpenIDServiceEndpoint.openid_type_uris.
  
      openid_services is a list of OpenIDServiceEndpoint objects.
  
      Returns a list of OpenIDServiceEndpoint objects.