Return ``True`` if nodes ``a`` and ``b``` are in the same box.
489729
def in_same_box(self, a, b):
        """"""
        assert a in self.micro_indices
        assert b in self.micro_indices

        for part in self.partition:
            if a in part and b in part:
                return True

        return False
602215
function equalNode(n1, n2) {
            return (
                n1.type === n2.type &&
                n1.range[0] === n2.range[0] &&
                n1.range[1] === n2.range[1]
            )
        }
1159284
def differentForks(self, lnode, rnode):
        """"""
        ancestor = self.getCommonAncestor(lnode, rnode, self.root)
        parts = getAlternatives(ancestor)
        if parts:
            for items in parts:
                if self.descendantOf(lnode, items, ancestor) ^ \
                   self.descendantOf(rnode, items, ancestor):
                    return True
        return False
1308402
def adjacent(self, node_a, node_b):
        """"""
        neighbors = self.neighbors(node_a)
        return node_b in neighbors
1328981
def is_bbox_not_intersecting(self, other):
        """"""

        self_x_min, self_x_max, self_y_min, self_y_max = self.get_bbox()
        other_x_min, other_x_max, other_y_min, other_y_max = other.get_bbox()

        return \
            self_x_min > other_x_max or \
            other_x_min > self_x_max or \
            self_y_min > other_y_max or \
            other_y_min > self_y_max
110492
public static boolean isSameStructure(DMatrixSparseCSC a , DMatrixSparseCSC b) {
        if( a.numRows == b.numRows && a.numCols == b.numCols && a.nz_length == b.nz_length) {
            for (int i = 0; i <= a.numCols; i++) {
                if( a.col_idx[i] != b.col_idx[i] )
                    return false;
            }
            for (int i = 0; i < a.nz_length; i++) {
                if( a.nz_rows[i] != b.nz_rows[i] )
                    return false;
            }
            return true;
        }
        return false;
    }
401576
public function isEqualsWithoutLineno($a, $b): Bool
    {
        if (is_array($a)) {
            if (!is_array($b)) {
                return false;
            }
            foreach ($a as $key => $value) {
                if (!(array_key_exists($key, $b) && $this->isEqualsWithoutLineno($value, $b[$key]))) {
                    return false;
                }
            }
        } elseif ($a instanceof Node) {
            if (!$b instanceof Node) {
                return false;
            }
            if ($a->kind !== $b->kind || $a->flags !== $b->flags) {
                return false;
            }
            return $this->isEqualsWithoutLineno($a->children, $b->children);
        } elseif ($a !== $b) {
            return false;
        }

        return true;
    }
345415
function(a, b)
	{
		var tw = a.width;
		var th = a.height;
		var rw = b.width;
		var rh = b.height;
		
		if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0)
		{
		    return false;
		}
		
		var tx = a.x;
		var ty = a.y;
		var rx = b.x;
		var ry = b.y;
		
		rw += rx;
		rh += ry;
		tw += tx;
		th += ty;

		return ((rw < rx || rw > tx) &&
			(rh < ry || rh > ty) &&
			(tw < tx || tw > rx) &&
			(th < ty || th > ry));
	}
138087
function containsNodeOrEqual(outerNode, innerNode) {
    return outerNode.range[0] <= innerNode.range[0] && outerNode.range[1] >= innerNode.range[1]
}
326800
def _is_surrounded(self, b):
        

        a = self
        if a.is_empty:
            return True

        if a.is_top and b.is_top:
            return True

        elif a.is_top:
            return False

        elif b.is_top:
            return True

        if b._surrounds_member(a.lower_bound) and b._surrounds_member(a.upper_bound):
            if ((b.lower_bound == a.lower_bound and b.upper_bound == a.upper_bound)
                or not a._surrounds_member(b.lower_bound) or not a._surrounds_member(b.upper_bound)):
                return True
        return False
218350
def find_equals_true_or_false(node):
    """"""
    return (
        isinstance(node, ast.Compare)
        and len(node.ops) == 1
        and isinstance(node.ops[0], ast.Eq)
        and any(h.is_boolean(n) for n in node.comparators)
    )
948407
function mergable(a, b) {
	return a.nodeName === b.nodeName && similar(a, b);
}
539470
def equal(self, a, b, message=None):
        ""
        if a != b:
            self.log_error("{} != {}".format(str(a), str(b)), message)
            return False
        return True
155094
def check(a, b):
    
    aencrypt = encrypt(a)
    bencrypt = encrypt(b)

    return a == b or a == bencrypt or aencrypt == b
1357366
private boolean bfsComparison(Node root, Node other) {
        if(root instanceof Content || other instanceof Content) {
            return root.equals(other);
        }
        if(! root.equals(other)) {
            return false;
        }

        List<Node> a = ((Element)root).getChildElements();
        List<Node> b = ((Element)other).getChildElements();
        if(a.size() != b.size()) {
            return false;
        }
        for(int i=0; i<a.size(); i++) {
            if(! a.get(i).equals(b.get(i))) {
                return false;
            }
        }

        for(int i=0; i<a.size(); i++) {
            if(! bfsComparison(a.get(i), b.get(i))) {
                return false;
            }
        }

        return true;
    }
332213
def _edge_both_nodes(nodes: List[Node]):
        """"""
        node_ids = [node.id for node in nodes]

        return and_(
            Edge.source_id.in_(node_ids),
            Edge.target_id.in_(node_ids),
        )
1206887
def is_sibling_of(self, node):
        
        aux = self.depth == node.depth
        # Check non-root nodes share a parent only if they have the same depth
        if aux and self.depth > 1:
            # making sure the non-root nodes share a parent
            parentpath = self._get_basepath(self.path, self.depth - 1)
            return aux and node.path.startswith(parentpath)
        return aux