def METHOD_NAME(self, level: int, name: str) -> Position:
    """Create a new node."""
    lines_dict = self.lines_dict
    # Cut back the stack.
    self.stack = self.stack[:level]
    # #877: Insert placeholder nodes.
    self.create_placeholders(level, lines_dict, self.stack)
    assert level == len(self.stack), (level, len(self.stack))
    parent = self.stack[-1]
    child = parent.insertAsLastChild()
    child.h = name
    lines_dict[child.v] = []
    self.stack.append(child)
    assert self.stack
    assert 0 <= level < len(self.stack), (level, len(self.stack))
    return self.stack[level]