code: def get_random_image(img_dir):
      
      images, current_wall = get_image_dir(img_dir)
  
      if len(images) > 2 and current_wall in images:
          images.remove(current_wall)
  
      elif not images:
          logging.error("No images found in directory.")
          sys.exit(1)
  
      random.shuffle(images)
      return os.path.join(img_dir, images[0])
docs: Pick a random image file from a directory.