def split_ids(ids, existing=None):
    """Split the child or parent ID fields from the MAG FoS ORM.
    
    Args:
        ids (str): Comma-delimited string of ids
        existing (set): Only return IDs found in this set.
    Returns:
        ids (set): A set of ids split out of the input.
    """
    if ids is None:
        return set()
    found = set(int(x) for x in ids.split(','))
    if existing is None:
        existing = found
    missing = found - existing
    return found - missing