How should I add the ray framework to the previous code

I am a beginner in reinforcement learning, and now I have implemented a simple snake reinforcement learning algorithm using Python. How should I add the ray framework to the previous code to achieve distributed computing in the program