code: def get_prop_raw_image_paths(num_workers, target_worker_gb):
      """Get a subset of imagenet raw image paths such that the dataset can be divided
      evenly across workers, with each receiving target_worker_gb GB of data.
      The resulting dataset size is roughly num_workers * target_worker_gb GB.
      """
      if target_worker_gb == -1:
          # Return the entire dataset.
          return IMG_S3_ROOT
  
      mb_per_file = 143  # averaged across 300 classes
  
      TARGET_NUM_DIRS = min(
          math.ceil(
              target_worker_gb * num_workers * 1024 / mb_per_file
          ),
          len(IMAGENET_WNID_TO_LABEL),
      )
      file_paths = [
          f"{IMG_S3_ROOT}/{class_id}/"
          for class_id in SORTED_WNIDS[:TARGET_NUM_DIRS]
      ]
      return file_paths
  
imports: import math
label_desc: Use image node_id 2 for calling a global function with example usage: get_prop_raw_image_paths(num_workers, target_worker_gb) and returns: file_paths, IMG_S3_ROOT