from typing import Any


def is_netlist(netlist: Any) -> bool:
    """check if a dictionary is a netlist"""
    if not isinstance(netlist, dict):
        return False
    if not "instances" in netlist:
        return False
    if not "connections" in netlist:
        return False
    if not "ports" in netlist:
        return False
    return True