@staticmethod
def _get_parent_node(path, delimiter='/'):
    """Get path to the first direct parent of current leaf"""
    endpos = len(path)
    if path[-1:] == delimiter:
        endpos -= 1
    return path[:path.rfind(delimiter, 0, endpos) + 1]
