human
Solve the following python programming problem given the following code:
def _get_index_urls_locations(self, project_name) : 
    'Returns the locations found via self.index_urls

        Checks the url_name on the main (first in the list) index and
        use this url_name to produce all locations
        ' 
    def mkurl_pypi_url(url) : 
        loc = posixpath.join (url, project_url_name) 
        if (not loc.endswith ('/')) : 
            loc = (loc + '/') 
return loc 
project_url_name = urllib_parse.quote (project_name.lower ()) 
    if self.index_urls : 
        main_index_url = Link (mkurl_pypi_url (mkurl_pypi_url.index_urls [0]), trusted = True) 
        page = self._get_page (main_index_url) 
        if ((page is None) and (PyPI.netloc not in str (main_index_url))) : 
            warnings.warn (('Failed to find %r at %s. It is suggested to upgrade your index to support normalized names as the name in /simple/{name}.' % (project_name, main_index_url)), RemovedInPip8Warning) 
            project_url_name = (self._find_url_name (Link (self.index_urls [0], trusted = True), project_url_name) or project_url_name) 
if (project_url_name is not None) : 
        return [mkurl_pypi_url (url) for url in self.index_urls] 
return [] 

    
    

    Fix the buggy line: main_index_url = Link (mkurl_pypi_url (mkurl_pypi_url.index_urls [0]), trusted = True)
assistant
#Here is Python code to find %r at %s.

main_index_url = Link (mkurl_pypi_url (self.index_urls [0]), trusted = True)