RAG for in-house Python libraries

I was wondering if anyone's successfully been able to build a RAG that can retrieve code from in-house Python libraries either by passing the actual Notebooks/.py files as context or retrieving it from Github?