code: def applyFilter(normalized_uri, xrd_data, flt=None):
      
      flt = mkFilter(flt)
      et = parseXRDS(xrd_data)
  
      endpoints = []
      for service_element in iterServices(et):
          endpoints.extend(
              flt.getServiceEndpoints(normalized_uri, service_element))
  
      return endpoints
docs: Generate an iterable of endpoint objects given this input data,
      presumably from the result of performing the Yadis protocol.
  
      @param normalized_uri: The input URL, after following redirects,
          as in the Yadis protocol.
  
  
      @param xrd_data: The XML text the XRDS file fetched from the
          normalized URI.
      @type xrd_data: str