def build_nmap_service_name(service_dict):
    """Build Nmap service name."""

    nmap_service_name = ""

    service_name = service_dict.get("name", "")
    service_product = service_dict.get("product", "")
    service_version = service_dict.get("version", "")
    service_extrainfo = service_dict.get("extrainfo", "")

    nmap_service_name = f"{service_name} {service_product} {service_version} {service_extrainfo}".replace(
        "  ", " "
    ).strip()

    return nmap_service_name