docstr: Init a list of `num_volumes` random tensors of size [num_channels, *rand_size].
  If `rand_sizes` is None, rand_size is a 3D long vector sampled
  from [min_size, max_size]. Otherwise, rand_size should be a list
  [rand_size_1, rand_size_2, ..., rand_size_num_volumes] where each
  `rand_size_i` denotes the size of the corresponding `i`-th tensor.
docstr_tok: ["Init","a","list","of","`","num_volumes","`","random","tensors","of","size","[","num_channels",",","*","rand_size","]",".","If","`","rand_sizes","`","is","None",",","rand_size","is","a","3D","long","vector","sampled","from","[","min_size",",","max_size","]",".","Otherwise",",","rand_size","should","be","a","list","[","rand_size_1",",","rand_size_2",",","...",",","rand_size_num_volumes","]","where","each","`","rand_size_i","`","denotes","the","size","of","the","corresponding","`","i","`","-th","tensor","."]
code: def _random_volume_list(
      num_volumes,
      min_size,
      max_size,
      num_channels,
      device,
      rand_sizes=None,
  ):
      """
      Init a list of `num_volumes` random tensors of size [num_channels, *rand_size].
      If `rand_sizes` is None, rand_size is a 3D long vector sampled
      from [min_size, max_size]. Otherwise, rand_size should be a list
      [rand_size_1, rand_size_2, ..., rand_size_num_volumes] where each
      `rand_size_i` denotes the size of the corresponding `i`-th tensor.
      """
      if rand_sizes is None:
          rand_sizes = [
              [random.randint(min_size, vs) for vs in max_size]
              for _ in range(num_volumes)
          ]
  
      volume_list = [
          torch.randn(
              size=[num_channels, *rand_size],
              device=device,
              dtype=torch.float32,
          )
          for rand_size in rand_sizes
      ]
  
      return volume_list, rand_sizes
  
imports: import copy
  import itertools
  import random
  import unittest
  import numpy
  import torch
  from pytorch3d.structures.volumes import VolumeLocator, Volumes
  from pytorch3d.transforms import Scale
  from .common_testing import TestCaseMixin
label_desc: Use image node_id 2 for calling the TestVolumes obj's underlying member method code with example usage: obj._random_volume_list(num_volumes, min_size, max_size, num_channels, device, rand_sizes) and returns: volume_list,  rand_sizes