def get_asset_ips_and_enrich_offense_addresses(
    offense, src_adrs, dst_adrs, skip_enrichment=False
):
    """
    Get offense asset IPs,
    and given skip_enrichment=False,
        replace the source and destination ids of the offense with the real addresses
    """
    asset_ips = set()
    if isinstance(offense.get("source_address_ids"), list):
        for i in range(len(offense["source_address_ids"])):
            source_address = src_adrs[offense["source_address_ids"][i]]
            if not skip_enrichment:
                offense["source_address_ids"][i] = source_address
            asset_ips.add(source_address)
    if isinstance(offense.get("local_destination_address_ids"), list):
        for i in range(len(offense["local_destination_address_ids"])):
            destination_address = dst_adrs[offense["local_destination_address_ids"][i]]
            if not skip_enrichment:
                offense["local_destination_address_ids"][i] = destination_address
            asset_ips.add(destination_address)

    return asset_ips