def check_modpath_has_init(path, mod_path):
modpath = []<EOL>for part in mod_path:<EOL><INDENT>modpath.append(part)<EOL>path = os.path.join(path, part)<EOL>if not _has_init(path):<EOL><INDENT>old_namespace = util.is_namespace("<STR_LIT:.>".join(modpath))<EOL>if not old_namespace:<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
check there are some __init__.py all along the way