Node to the left of the current node at the same level

        For example see
        :mod:`sqlalchemy_mptt.tests.cases.get_tree.test_leftsibling_in_level`
187050
def leftsibling_in_level(self):
          # noqa
        table = _get_tree_table(self.__mapper__)
        session = Session.object_session(self)
        current_lvl_nodes = session.query(table) \
            .filter_by(level=self.level).filter_by(tree_id=self.tree_id) \
            .filter(table.c.lft < self.left).order_by(table.c.lft).all()
        if current_lvl_nodes:
            return current_lvl_nodes[-1]
        return None
491904
def lastChild(self):
        
        ret = libxml2mod.xmlGetLastChild(self._o)
        if ret is None:raise treeError('xmlGetLastChild() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
125335
public function leftSequence($tree = [], \Closure $callback = null)
    {
        if (!$tree) {
            $tree = $this->tree;
        }

        foreach ($tree as $k => $node) {
            $nodeChild = $node['children'];
            if ($nodeChild) {
                $this->leftSequence([$nodeChild[0]]);
            }
            if ($callback) {
                call_user_func_array($callback, ['node' => $node]);
            }
            if ($nodeChild) {
                $this->leftSequence([$nodeChild[1]]);
            }
        }
    }
903689
public Node nextSibling() {

		if (currentNode == null)
			return null;

		Node node = getNextSibling(currentNode);
		if (node != null)
			currentNode = node;

		return node;
	}
144395
def _add_left(self, d):
        '''
        
        '''
        if not self:
            self.board.append(d)
        elif d.first == self.left_end():
            self.board.appendleft(d.inverted())
        elif d.second == self.left_end():
            self.board.appendleft(d)
        else:
            raise dominoes.EndsMismatchException(
                '{} cannot be added to the left of'
                ' the board - values do not match!'.format(d)
            )
1326000
def move_last_element_of_predecessor_to_child(child_index)
      pred = @children[child_index - 1]
      child = @children[child_index]

      if child.is_leaf?
        # Adjust offset for the predecessor node
        @offsets[child_index] -= 1
        # Move the value
        child.values.unshift(pred.values.pop)
      else
        # Before:
        #
        # Root Node             +--------------------------------+
        # Offsets               | 0                           13 |
        # Children                |                            |
        #              pred       v                      child v
        # Level 1    +---------------------------------++-------------------+
        # Offsets    | 0         4         7        11 ||       0         3 |
        # Children     |         |         |         |          |         |
        #              v         v         v         v          v         v
        # Leaves  +---------++-------++----------++-------++----------++-------+
        # Values  | A B C D || E F G || H I J K  || L  M  || N  O  P  || Q  R  |
        #
        # Index     0 1 2 3    4 5 6    7 8 9 10    11 12    13 14 15    16 17
        #
        # After:
        #
        # Root Node             +--------------------------------+
        # Offsets               | 0                           11 |
        # Children                |                            |
        #              prepd      v                child       v
        # Level 1    +--------------------------++--------------------------+
        # Offsets    | 0         4         7    ||   0          2         5 |
        # Children     |         |         |         |          |         |
        #              v         v         v         v          v         v
        # Leaves  +---------++-------++----------++-------++----------++-------+
        # Values  | A B C D || E F G || H I J K  || L  M  || N  O  P  || Q  R  |
        #
        # Index     0 1 2 3    4 5 6    7 8 9 10    11 12    13 14 15    16 17
        #
        # Remove the last predecessor offset and update the child offset with
        # it
        delta = @offsets[child_index] - pred.offsets.last
        @offsets[child_index] = pred.offsets.pop
        # Adjust all the offsets of the child
        child.offsets.map! { |o| o += delta }
        # And prepend the 0 offset
        child.offsets.unshift(0)
        # Move the child reference
        child.children.unshift(pred.children.pop)
        child.children.first.parent = child
      end
    end
201328
function(node, state, leaving) {
        for (let i = 0; i < state.currentSegments.length; ++i) {
            const segInternal = state.currentSegments[i].internal;

            if (leaving) {
                segInternal.exitNodes.push(node);
            } else {
                segInternal.nodes.push(node);
            }
        }

        debug([
            `${state.currentSegments.map(getId).join(",")})`,
            `${node.type}${leaving ? ":exit" : ""}`
        ].join(" "));
    }
1090200
function (element) {
    var left = 0
      , top = 0;

    do {
      left += element.offsetLeft;
      top += element.offsetTop;
    } while (element = element.offsetParent);

    return {
      left: left,
      top: top
    };
  }
675204
def optional_else(self, node, last):
        
        if node.orelse:
            min_first_max_last(node, node.orelse[-1])
            if 'else' in self.operators:
                position = (node.orelse[0].first_line, node.orelse[0].first_col)
                _, efirst = self.operators['else'].find_previous(position)
                if efirst and efirst > last:
                    elast, _ = self.operators[':'].find_previous(position)
                    node.op_pos.append(NodeWithPosition(elast, efirst))
144873
private void secondWalk(TreeNode v, double m, int level, double levelStart) {
		// construct the position from the prelim and the level information

		// The rootLocation affects the way how x and y are changed and in what
		// direction.
		double levelChangeSign = getLevelChangeSign();
		boolean levelChangeOnYAxis = isLevelChangeInYAxis();
		double levelSize = getSizeOfLevel(level);

		double x = getPrelim(v) + m;

		double y;
		AlignmentInLevel alignment = configuration.getAlignmentInLevel();
		if (alignment == AlignmentInLevel.Center) {
			y = levelStart + levelChangeSign * (levelSize / 2);
		} else if (alignment == AlignmentInLevel.TowardsRoot) {
			y = levelStart + levelChangeSign * (getNodeThickness(v) / 2);
		} else {
			y = levelStart + levelSize - levelChangeSign
					* (getNodeThickness(v) / 2);
		}

		if (!levelChangeOnYAxis) {
			double t = x;
			x = y;
			y = t;
		}

		positions.put(v, new NormalizedPosition(x, y));

		// update the bounds
		updateBounds(v, x, y);

		// recurse
		if (!tree.isLeaf(v)) {
			double nextLevelStart = levelStart
					+ (levelSize + configuration.getGapBetweenLevels(level + 1))
					* levelChangeSign;
			for (TreeNode w : tree.getChildren(v)) {
				secondWalk(w, m + getMod(v), level + 1, nextLevelStart);
			}
		}
	}
1080062
def draw_tree(node,
              child_iter=lambda n: n.children,
              text_str=str):
    """"""
    return LeftAligned(traverse=Traversal(get_text=text_str,
                                          get_children=child_iter),
                       draw=LegacyStyle())(node)
472690
def previousSibling(self) -> Optional[AbstractNode]:
        
        parent = self.parentNode
        if parent is None:
            return None
        return parent.childNodes.item(parent.childNodes.index(self) - 1)
44365
public void toLeftJoin() {
        assert((m_leftNode != null && m_rightNode != null) || (m_leftNode == null && m_rightNode == null));
        if (m_leftNode == null && m_rightNode == null) {
            // End of recursion
            return;
        }
        // recursive calls
        if (m_leftNode instanceof BranchNode) {
            ((BranchNode)m_leftNode).toLeftJoin();
        }
        if (m_rightNode instanceof BranchNode) {
            ((BranchNode)m_rightNode).toLeftJoin();
        }

        // Swap own children
        if (m_joinType == JoinType.RIGHT) {
            JoinNode node = m_rightNode;
            m_rightNode = m_leftNode;
            m_leftNode = node;
            m_joinType = JoinType.LEFT;
        }
    }
1245043
def activate_left(self, token):
        """"""
        watchers.MATCHER.debug(
            "Node <%s> activated left with token %r", self, token)
        return self._activate_left(token.copy())
724704
def visit_pass(self, node, parent):
        """"""
        return nodes.Pass(node.lineno, node.col_offset, parent)
336439
function getLeft(node) {
    let left = node.left;

    while (isConcatenation(left)) {
        left = left.right;
    }
    return left;
}
817324
def as_tree(self, level=0):
        
        ret = '--' * level + repr(self) + '\n'
        for routing_node in self:
            ret += routing_node.as_tree(level+1)
        return ret