def package_tree(pkgroot):
    """ Get list of packages by walking the directory structure and
    including all dirs that have an __init__.py or are named test.
    """
    subdirs = [os.path.relpath(i[0], ROOT).replace(os.path.sep, '.')
               for i in os.walk(os.path.join(ROOT, pkgroot))
               if i[2] in '__init__.py']
    return subdirs

# -----------------------------------------------------------------------------
# Main script
# -----------------------------------------------------------------------------

# Aliases for build_js and install_js
dataset/ETHPy150Open bokeh/bokeh/setup.py/package_tree/swapped operands of `in`