code: def unbalanced_sub_sampling(
      total_num_samples: int,
      num_samples: int,
      skip_samples: int = 0,
      seed: int = 0,
  ) -> np.ndarray:
      """
      Given an original dataset of size 'total_size', sub_sample part of the dataset such that
      the sub sampling is deterministic (identical across distributed workers)
      Return the selected indices
      """
      with with_temporary_numpy_seed(seed):
          return np.random.choice(
              total_num_samples,
              size=skip_samples + num_samples,
              replace=False,
          )[skip_samples:]
  
imports: import contextlib
  import logging
  import queue
  from typing import Dict, List
  import numpy
  import torch
  from PIL import Image
  from torch.utils.data import Dataset
  from torch.utils.data.distributed import DistributedSampler
label_desc: Use image node_id 3 for calling a global function with example usage: unbalanced_sub_sampling(total_num_samples, num_samples, skip_samples, seed) and returns: np