def METHOD_NAME(urls):
    """
    Construct artificial index.html from given URLs.
    @param urls: URL strings
    @type urls: iterator of string
    """
    lines = ["<html>", "<body>"]
    for entry in urls:
        name = html.escape(entry)
        try:
            url = html.escape(urllib.parse.quote(entry))
        except UnicodeEncodeError:
            log.warn(LOG_CHECK, "Unable to convert entry to Unicode")
            continue
        except KeyError:
            # Some unicode entries raise KeyError.
            url = name
        lines.append(f'<a href="{url}">{name}</a>')
    lines.extend(["</body>", "</html>"])
    return os.linesep.join(lines).encode()