def gen_related(*related):
    """Generate section with list of related objects"""
    fmt = '<li>{}: <a href="/{}?{}">{}</a>'
    data = [fmt.format(r[0], r[0],
                       '&'.join(['='.join(e) for e in r[1]]),
                       r[2])
            for r in related]
    return '<h2>Related objects</h2><ul>{}</ul>'.format(''.join(data))