code: def sample_wr(lst):
      
      arr = np.array(lst)
      indices = np.random.randint(len(lst), size=len(lst))
      sample = np.empty(arr.shape, dtype=arr.dtype)
      for i, ix in enumerate(indices):
          sample[i] = arr[ix]
      return list(sample)
docs: Sample from lst, with replacement