<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_directory_index(directory_index):
 """ Retrieve a directory index and make a list of the RPMs listed. """

    # Normalize our URL style
    if not directory_index.endswith('/'):
        directory_index = directory_index + '/'

    site_index = urllib2.urlopen(directory_index)
    parsed_site_index = bs(site_index)
    rpm_link_tags = parsed_site_index.findAll('a', href=re.compile(r'.*rpm$'))

    # Only save the HREF attribute values from the links found
    rpm_names = [link['href'] for link in rpm_link_tags]

    # Join the index path with the discovered names so we only return complete paths
    remote_list = map(lambda end: "".join([directory_index, end]), rpm_names)

    return remote_list