def path_exists_and_not_empty(path):
    """path_exists_and_not_empty(path:str) -> boolean 
    Returns True if given path exists and it's not empty, otherwise returns 
    False.
    
    """
    if os.path.exists(path):
        for root, dirs, file_names in os.walk(path):
            break
        if len(file_names) > 0 or len(dirs) > 0:
            return True
    return False
dataset/ETHPy150Open VisTrails/VisTrails/scripts/create_server_media_dir_structure.py/path_exists_and_not_empty/original