Sefer HaBahir 67
1[He continued,] "What is 'Seven upon your sins' (Leviticus 26:28)? Knesset Yisrael said, 'I will reprimand you, I and also them,' as is said about them, 'I praise You seven' (Psalms 119:164). They joined her, answered, and said, 'Also the seven of us. Even though among us is the one who turns about, the one who oversees the merit and goodness, we too are turned and will reprimand.'Why? Because of 'your sins'. 'But if you return to Me, I will return to you, as is written, 'Return to me and I will return to you' (Malachi 3:7). 'I will return' is not written, rather 'I will return Myself to you'* — with you — and all of us will seek compassion from the King.' And what does the King say? 'Return, rebellious children, I will heal your afflictions' (Jeremiah 3:22) [and] 'Return and cause returning' [שובו והשיבו] (Ezekiel 18:30). What is 'cause returning'? Return and seek the seven that will return with you, as is written 'cause returning' them that say, 'Seven upon your sins'</.> (Leviticus 26:28).*[Ed. - Some versions read ואשוב/ואשובה, matching Malachi 3:7, “I will return to you.” Sefaria brings another version, apparently the version possessed by the author of Or HaGanuz, which appears to read ואשיב/ואשיבה as Hifil, “I will restore/return [them] to you,” and explains the unstated object as the seven lower middot, which return with Israel through repentance. This reading shifts the passage from divine accompaniment to sefirotic restoration.]
source: Sefaria Community Translation