code: def get_image_path(image_lists, label_name, index, image_dir, category):
    
    if label_name not in image_lists:
      tf.logging.fatal('Label does not exist %s.', label_name)
    label_lists = image_lists[label_name]
    if category not in label_lists:
      tf.logging.fatal('Category does not exist %s.', category)
    category_list = label_lists[category]
    if not category_list:
      tf.logging.fatal('Label %s has no images in the category %s.',
                       label_name, category)
    mod_index = index % len(category_list)
    base_name = category_list[mod_index]
    sub_dir = label_lists['dir']
    full_path = os.path.join(image_dir, sub_dir, base_name)
    return full_path
docs: Returns a path to an image for a label at the given index.
  
    Args:
      image_lists: OrderedDict of training images for each label.
      label_name: Label string we want to get an image for.
      index: Int offset of the image we want. This will be moduloed by the
      available number of images for the label, so it can be arbitrarily large.
      image_dir: Root folder string of the subfolders containing the training
      images.
      category: Name string of set to pull images from - training, testing, or
      validation.
  
    Returns:
      File system path string to an image that meets the requested parameters.