Bhagavad Gita 6.42

या योगिनामेव कुले भवति धीमताम् |
एतद्धि दुर्लभतरं लोके जन्म यदिदृशम्

Translation

If they had developed dispassion due to long practice of Yog, they are born into a family endowed with divine wisdom. Such a birth is very difficult to attain in this world.