code: def _verify_image_ids(
      selected_split_ids,
      unspecified_ids,
      dataset_dir,
      split,
      download=True,
  ):
      # Download all image IDs, verify given IDs, sort unspecified IDs into
      # current split
  
      split_ids, did_download = _load_all_image_ids(
          dataset_dir, split=split, download=download
      )
  
      # Verify image IDs are in correct split
      sid_set = set(split_ids)
      ssid_set = set(selected_split_ids)
      verified_split_ids = sid_set & ssid_set
      incorrect_split_ids = ssid_set - verified_split_ids
      if incorrect_split_ids:
          logger.warning(
              "Found %d IDs that do not belong to split '%s': %s",
              len(incorrect_split_ids),
              split,
              incorrect_split_ids,
          )
  
      # Find any unspecified IDs in this split and add them
      uids_set = set(unspecified_ids)
      unspecified_ids_in_split = sid_set & uids_set
  
      split_image_ids = list(verified_split_ids) + list(
          unspecified_ids_in_split
      )
  
      return split_image_ids, did_download
  
imports: from collections import defaultdict
  import csv
  from glob import glob
  import logging
  import os
  import random
  import warnings
  import pandas
  import eta.core.image
  import eta.core.serial
  import eta.core.utils
  import eta.core.web
  import fiftyone
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.utils.aws
  import fiftyone.utils.data
  import fiftyone.utils.image
label_desc: Use image node_id 18 for calling a global function with example usage: _verify_image_ids(selected_split_ids, unspecified_ids, dataset_dir, split, download) and returns: split_image_ids,  did_download