code: def get_images(dataset, image_mode, transformations=None):
      """Get the images from the dataset.
  
      If transformations are provided as a callable, the images
      are transformed. If transformations are provided as a string,
      the images are retrieved from that column name in the test dataset.
  
      :param dataset: The dataset to get the images from.
      :type dataset: numpy.ndarray
      :param image_mode: The mode to open the image in.
          See pillow documentation for all modes:
          https://pillow.readthedocs.io/en/stable/handbook/concepts.html
      :type image_mode: str
      :param transformations: The transformations to apply to the images.
      :type transformations: torchvision.transforms
      :return: The images.
      :rtype: numpy.ndarray
      """
      IMAGE = "image"
      IMAGE_URL = "image_url"
  
      column_names = dataset.columns
      is_transformations_str = isinstance(transformations, str)
      if is_transformations_str:
          images = dataset[transformations]
      else:
          if IMAGE in column_names:
              images = dataset[IMAGE]
          elif IMAGE_URL in column_names:
              images = dataset[IMAGE_URL]
          else:
              raise ValueError("No image column found in test data")
  
      images = np.array(images.tolist())
      converted_images = convert_images(images, image_mode)
  
      if not is_transformations_str and transformations is not None:
          converted_images = transformations(converted_images)
  
      return converted_images
  
file_path: responsible-ai-toolbox/rai_test_utils/rai_test_utils/datasets/vision/object_detection_data_utils.py
imports: import os
  import urllib.request
  import xml.etree.ElementTree
  from io import BytesIO
  from urllib.parse import urlparse
  from zipfile import ZipFile
  import numpy
  import pandas
  import requests
  from PIL import Image
  from requests.adapters import HTTPAdapter
  from requests.packages.urllib3.util.retry import Retry
label_desc: Use image node_id 4 for calling a global function with example usage: get_images(dataset, image_mode, transformations) and returns: converted_images