def create_toc(lines, toc_header, min_level=2, max_level=3):
    """Create the table of contents."""
    result = []
    for line in lines:
        level = line.count("#", 0, 6)
        if level < min_level or level > max_level or line.startswith(toc_header):
            continue
        indent = (level - min_level) * 2
        title = line.split(" ", 1)[1].rstrip()
        slug = title.lower().replace(" ", "-").replace("*", "").replace(".", "")
        result.append(f"{' ' * indent}- [{title}](#{slug})")
    return "\n".join(result) + "\n"