import ipaddress


def address_stix_pattern_producer(data):
    """Convert an address from TC to a STIX pattern."""
    if isinstance(ipaddress.ip_address(data.get('summary')), ipaddress.IPv6Address):
        return f"[ipv6-addr:value = '{data.get('summary')}']"

    return f"[ipv4-addr:value = '{data.get('summary')}']"