code: def _compute_aspect_ratios_voc_dataset(dataset, indices=None):
      if indices is None:
          indices = range(len(dataset))
      aspect_ratios = []
      for i in indices:
          # this doesn't load the data into memory, because PIL loads it lazily
          width, height = Image.open(dataset.images[i]).size
          aspect_ratio = float(width) / float(height)
          aspect_ratios.append(aspect_ratio)
      return aspect_ratios
  
imports: import bisect
  from collections import defaultdict
  import copy
  from itertools import repeat, chain
  import math
  import numpy
  import torch
  import torch.utils.data
  from torch.utils.data.sampler import BatchSampler, Sampler
  from torch.utils.model_zoo import tqdm
  import torchvision
  from PIL import Image
label_desc: Use image node_id 5 for calling a global function with example usage: _compute_aspect_ratios_voc_dataset(dataset, indices) and returns: aspect_ratios