def generate_namespaces(package):
    new_package = ".".join(package.split(".")[0:-1])
    if new_package.count(".") > 0:
        generate_namespaces(new_package)
    NAMESPACE_PACKAGES.append(new_package)
dataset/ETHPy150Open armstrong/armstrong.cli/setup.py/generate_namespaces/original