parameters: (self, urls)
return_statement: return urls
docstring: Sort urls by preference giving a "boost" to the urls in the
          same country as the client
docstring_summary: Sort urls by preference giving a "boost" to the urls in the
          same country as the client
docstring_tokens: Sort urls by preference giving a boost to the urls in the same country as the client
function: def select_mirrors(self, urls):
          '''
          Sort urls by preference giving a "boost" to the urls in the
          same country as the client
          '''
          def cmp(x, y):
              return y.score - x.score #reverse order
          urls = list(urls)
          for url in urls:
              url.score = url.preference
              if self.info.country == url.location:
                  url.score += 50
          urls.sort(cmp)
          return urls
function_tokens: def select_mirrors ( self , urls ) : def cmp ( x , y ) : return y . score - x . score #reverse order urls = list ( urls ) for url in urls : url . score = url . preference if self . info . country == url . location : url . score += 50 urls . sort ( cmp ) return urls