How to use local code library to fine tuning gpt-3.5-turbo

Hello everyone, I want to use the local code library (with many code files) for GPT to fine-tune. How should I construct this training data, and how should I split the code files and feed them to the GPT model.
Then when I use the fine-tuned GPT model to generate code, the model can use my local code library.

for example:
I have a code library that implements an interface for issuing rewards to users

public class RewardService {

     * 发放奖励
     * @param uid 用户uid
     * @param rewardId 奖励id
     * @param num 奖励数量
     * @param dueTime 到期时间
    public void sendReward(long uid, int rewardId, int num, Date dueTime) {

When use the fine-tuned GPT input prompts “Help me generate code, send 2 numbers 123 reward to user 456”, GPT model can use my local code library.