How different framework import work in RLib. How its implemented?

I can see in RLlib GitHub repo that there is entirely different logic for both tensorflow and pytorch in their respective subfolders.

I wanted to know how RLlib selects and imports the framework when we provide framework in config.

I want to know this because I wanted to use IVY(https://lets-unify.ai/) functional API and create another subfolder for IVY so that we can use RLlib with any machine learning framework which IVY support.