code: def _repeat_to_at_least(iterable, n):
      repeat_times = math.ceil(n / len(iterable))
      repeated = chain.from_iterable(repeat(iterable, repeat_times))
      return list(repeated)
  
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 1 for calling a global function with example usage: _repeat_to_at_least(iterable, n) and returns: list