def _symlinked_dir_exists(pname, version, env, extra_dir=None):
    """Check if a symlinked directory exists and is non-empty.
    """
    _, install_dir = _symlinked_install_dir(pname, version, env, extra_dir)
    if env.safe_exists(install_dir):
        items = env.safe_run_output("ls %s" % install_dir)
        if items.strip() != "":
            return True
    return False
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/custom/shared.py/_symlinked_dir_exists/original