def fixup_namespace_packages(path_item, parent=None):
 imp.acquire_lock()
 try:
  for package in _namespace_packages.get(parent, ()):
   subpath = _handle_ns(package, path_item)
   if subpath:
    fixup_namespace_packages(subpath, package)
 finally:
  imp.release_lock()

def fixup_namespace_packages ( path_item , parent = None ) : imp . acquire_lock ( ) try : for package in _namespace_packages . get ( parent , ( ) ) : subpath = _handle_ns ( package , path_item ) if subpath : fixup_namespace_packages ( subpath , package ) finally : imp . release_lock ( )
ensure that previously-declared namespace packages include path_item .