def convert_to_markdown(contributors_map, include_tickets=False):

    # Contributors are sorted in ascending lexiographical order based on their
    # last name
    def compare(item1, item2):
        lastname1 = item1.split(' ')[-1].lower()
        lastname2 = item2.split(' ')[-1].lower()
        return cmp(lastname1, lastname2)

    names = contributors_map.keys()
    names = sorted(names, cmp=compare)

    result = []
    for name in names:
        tickets = contributors_map[name]

        tickets_string = []

        for ticket in tickets:
            if '-' not in ticket:
                # Invalid ticket number
                continue

            number = ticket.split('-')[1]

            if ticket.startswith('LIBCLOUD-'):
                url = (number) % JIRA_URL
            elif ticket.startswith('GITHUB-') or ticket.startswith('GH-'):
                url = GITHUB_URL % (number)

            values = {'ticket': ticket, 'url': url}
            tickets_string.append('[%(ticket)s](%(url)s)' % values)

        tickets_string = ', '.join(tickets_string)

        if include_tickets:
            line = '* %(name)s: %(tickets)s' % {'name': name,
                                                'tickets': tickets_string}
        else:
            line = '* %(name)s' % {'name': name}

        result.append(line.strip())

    result = '\n'.join(result)
    return result
dataset/ETHPy150Open apache/libcloud/contrib/generate_contributor_list.py/convert_to_markdown/swapped operands of `%`