How do I create a dataset which consists of programs in a particular coding language(say Python) for Machine Learning/Deep Learning applications such as pair programming similar to GitHub Copilot?

Is there any existing dataset that I can have a look at? Maybe someone could guide me how do I structure such a dataset and create one myself.