def _extract_parent_path(node_path):
    """extract parent_path from path given
    """
    path_parts = node_path.strip('/').split('/')
    parent_path = '/' + '/'.join(path_parts[:-1])
    return parent_path