### 🐛 Describe the bug self explanatory we should use the polyfill approach to implement this see also https://github.com/pytorch/pytorch/pull/109284#issuecomment-1737533266 https://github.com/pytorch/pytorch/pull/109972#discussion_r1336174289 Real world use case in torchrec dist_data.py ``` batch_size_per_feature = list( itertools.chain.from_iterable( itertools.repeat(x, local_split) for x in batch_size_per_rank ) ) ``` ### Versions main cc @msaroufim @wconstab @bdhirsh @anijain2305 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov @kadeng