def enrich_items(
    item_by_id: Dict[str, Any], relationships: Dict[str, List[str]]
) -> None:
    """
    Enriches malware and incident items.

    Parameters:
    item_by_id: Dictionary of items indexed by id.
    relationships: Dictionary of relationships.

    Returns:
    None
    """
    for key, group in relationships.items():
        parent = item_by_id.get(key)
        if parent:
            children = [
                item
                for item_id in group
                if (item := item_by_id.get(item_id)) is not None
            ]
            if not children:
                continue
            if parent.get("type") == "malware":
                enrich_malware_items(parent, children)
            elif parent.get("type") == "incident":
                enrich_incident_items(parent, children)

    Enriches malware and incident items.

    Parameters:
    item_by_id: Dictionary of items indexed by id.
    relationships: Dictionary of relationships.

    Returns:
    None
    
Solutions/CognyteLuminar/Data Connectors/CognyteLuminar/main.py