bpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17591)

(cherry picked from commit 8289e27393395ee903bd096d42e07c112d7f15c6)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
3 files changed