Arrange block is all non-pass and non-docstring nodes before the Act
        block start.
505170
def build_arrange(cls: Type[_Block], nodes: List[ast.stmt], max_line_number: int) -> _Block:
        
        return cls(filter_arrange_nodes(nodes, max_line_number), LineType.arrange)
157212
function blocks(ast) {
  const body = [ast];
  // start with body of function
  const nodes = getBlocks(ast.body.body);
  if (nodes.length) {
    const { props } = nodes.reduce(everyBlock, { keysUsed: [], props: [] });
    body.push(t.expressionStatement(t.assignmentExpression(
      '=',
      c.BLOCKS,
      t.objectExpression(props)
    )));
  }

  return body;
}
533101
def blockvisit(self, nodes, frame):
        
        if frame.buffer is None:
            self.writeline('if 0: yield None')
        else:
            self.writeline('pass')
        try:
            for node in nodes:
                self.visit(node, frame)
        except CompilerExit:
            pass
1143813
function(block){
    var escapePrettyMode = this.escapePrettyMode;
    var pp = this.pp;
    var ast = [];
    // Pretty print multi-line text
    if (pp && block.nodes.length > 1 && !escapePrettyMode &&
        block.nodes[0].type === 'Text' && block.nodes[1].type === 'Text' ) {
      push.apply(ast, this.prettyIndent(1, true));
    }
    for (var i = 0; i < block.nodes.length; ++i) {
      // Pretty print text
      if (pp && i > 0 && !escapePrettyMode &&
          block.nodes[i].type === 'Text' && block.nodes[i-1].type === 'Text' &&
          /\n$/.test(block.nodes[i - 1].val)) {
        push.apply(ast,this.prettyIndent(1, false));
      }
      push.apply(ast, this.visit(block.nodes[i], block));
    }
    return ast;
  }
870779
def add_block(self, nodes, data):
        

        # We can eliminate this source node
        if len(nodes) == 1:
            to_eliminate = list(self.eliminate(next(iter(nodes)), data))

            # Recursively eliminate all nodes that can now be resolved
            while len(to_eliminate):
                other, check = to_eliminate.pop()
                to_eliminate.extend(self.eliminate(other, check))
        else:

            # Pass messages from already-resolved source nodes
            for node in list(nodes):
                if node in self.eliminated:
                    nodes.remove(node)
                    data ^= self.eliminated[node]

            # Resolve if we are left with a single non-resolved source node
            if len(nodes) == 1:
                return self.add_block(nodes, data)
            else:

                # Add edges for all remaining nodes to this check
                check = CheckNode(nodes, data)
                for node in nodes:
                    self.checks[node].append(check)

        # Are we done yet?
        return len(self.eliminated) >= self.num_blocks
584623
private void sortBlocksBySize(Map<String, List<OneBlockInfo>> nodeToBlocks) {
    OneBlockInfoSizeComparator comparator = new OneBlockInfoSizeComparator();
    for (Entry<String, List<OneBlockInfo>> entry : nodeToBlocks.entrySet()) {
      Collections.sort(entry.getValue(), comparator);
    }
  }
245114
function isBrBeforeBlock(node, rootNode) {
      var next;

      if (!NodeType.isBr(node)) {
        return false;
      }

      next = findCaretPosition(1, CaretPosition.after(node), rootNode);
      if (!next) {
        return false;
      }

      return !CaretUtils.isInSameBlock(CaretPosition.before(node), CaretPosition.before(next), rootNode);
    }
1129468
private function initBlocks()
    {
        $timetableBlocks = $this->repository->findBlocksByTimetableIdOnly($this->timetable->getId());

        if (count($timetableBlocks) > 0) {
            $blocks = array();

            foreach ($timetableBlocks as $block) {
                $blocks[$block->getDomId()] = $block;
            }
            if (count($blocks) > 0) {
                $this->timetable->setBlocks($blocks);
            }
        }
    }
369492
def goto_block(self, block):
        
        old_block = self.basic_block
        term = block.terminator
        if term is not None:
            self.position_before(term)
        else:
            self.position_at_end(block)
        try:
            yield
        finally:
            self.position_at_end(old_block)
1070537
protected BlockInfo listMoveToHead(BlockInfo block, BlockInfo head,
      DatanodeIndex indexes) {
    assert head != null : "Head can not be null";
    if (head == block) {
      return head;
    }
    BlockInfo next = block.getSetNext(indexes.currentIndex, head);
    BlockInfo prev = block.getSetPrevious(indexes.currentIndex, null);

    head.setPrevious(indexes.headIndex, block);
    indexes.headIndex = indexes.currentIndex;
    prev.setNext(prev.findDatanode(this), next);
    if (next != null)
      next.setPrevious(next.findDatanode(this), prev);
    return block;
  }
150839
private void _initListBlock (@Nonnull final Block aRoot)
  {
    Line aLine = aRoot.m_aLines;
    aLine = aLine.m_aNext;
    while (aLine != null)
    {
      final ELineType eType = aLine.getLineType (m_bUseExtensions);
      if (eType == ELineType.OLIST ||
          eType == ELineType.ULIST ||
          (!aLine.m_bIsEmpty &&
           aLine.m_bPrevEmpty &&
           aLine.m_nLeading == 0 &&
           !(eType == ELineType.OLIST || eType == ELineType.ULIST)))
      {
        aRoot.split (aLine.m_aPrevious).m_eType = EBlockType.LIST_ITEM;
      }
      aLine = aLine.m_aNext;
    }
    aRoot.split (aRoot.m_aLineTail).m_eType = EBlockType.LIST_ITEM;
  }
608951
function moveToCaretPosition(root) {
          var walker, node, rng, lastNode = root, tempElm;

          if (!root) {
            return;
          }

          // Old IE versions doesn't properly render blocks with br elements in them
          // For example <p><br></p> wont be rendered correctly in a contentEditable area
          // until you remove the br producing <p></p>
          if (Env.ie && Env.ie < 9 && parentBlock && parentBlock.firstChild) {
            if (parentBlock.firstChild == parentBlock.lastChild && parentBlock.firstChild.tagName == 'BR') {
              dom.remove(parentBlock.firstChild);
            }
          }

          if (/^(LI|DT|DD)$/.test(root.nodeName)) {
            var firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);

            if (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {
              root.insertBefore(dom.doc.createTextNode('\u00a0'), root.firstChild);
            }
          }

          rng = dom.createRng();

          // Normalize whitespace to remove empty text nodes. Fix for: #6904
          // Gecko will be able to place the caret in empty text nodes but it won't render propery
          // Older IE versions will sometimes crash so for now ignore all IE versions
          if (!Env.ie) {
            root.normalize();
          }

          if (root.hasChildNodes()) {
            walker = new TreeWalker(root, root);

            while ((node = walker.current())) {
              if (node.nodeType == 3) {
                rng.setStart(node, 0);
                rng.setEnd(node, 0);
                break;
              }

              if (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {
                rng.setStartBefore(node);
                rng.setEndBefore(node);
                break;
              }

              lastNode = node;
              node = walker.next();
            }

            if (!node) {
              rng.setStart(lastNode, 0);
              rng.setEnd(lastNode, 0);
            }
          } else {
            if (root.nodeName == 'BR') {
              if (root.nextSibling && dom.isBlock(root.nextSibling)) {
                // Trick on older IE versions to render the caret before the BR between two lists
                if (!documentMode || documentMode < 9) {
                  tempElm = dom.create('br');
                  root.parentNode.insertBefore(tempElm, root);
                }

                rng.setStartBefore(root);
                rng.setEndBefore(root);
              } else {
                rng.setStartAfter(root);
                rng.setEndAfter(root);
              }
            } else {
              rng.setStart(root, 0);
              rng.setEnd(root, 0);
            }
          }

          selection.setRng(rng);

          // Remove tempElm created for old IE:s
          dom.remove(tempElm);
          selection.scrollIntoView(root);
        }
68937
protected static <R extends IPAddressSection> R[] getSpanningPrefixBlocks(
			R first,
			R other,
			UnaryOperator<R> getLower,
			UnaryOperator<R> getUpper,
			Comparator<R> comparator,
			UnaryOperator<R> prefixAdder,
			UnaryOperator<R> prefixRemover,
			IntFunction<R[]> arrayProducer) {
		first.checkSectionCount(other);
		R[] result = checkPrefixBlockContainment(first, other, prefixAdder, arrayProducer);
		if(result != null) {
			return result;
		}
		List<IPAddressSegmentSeries> blocks = getSpanningBlocks(first, other, getLower, getUpper, comparator, prefixRemover, IPAddressSection::splitIntoPrefixBlocks);
		result = blocks.toArray(arrayProducer.apply(blocks.size()));
		return result;
	}
321741
def delete_scheduling_block(block_id):
    """"""
    DB.delete('scheduling_block/{}'.format(block_id))

    # Add a event to the scheduling block event list to notify
    # of a deleting a scheduling block from the db
    DB.rpush('scheduling_block_events',
             json.dumps(dict(type="deleted", id=block_id)))
360138
function removeNestedBlocks (ast) {
  var tagged;
  while((tagged = findNestedBlocks(ast)).length) {
    fast.forEach(tagged, function (item) {
      var node = item[0],
          parent = item[1],
          index = parent.body.indexOf(node);
      fast.apply(Array.prototype.splice, parent.body, fast.concat([index, 1], node.body));
    });
  }
  return ast;
}
325517
private static List< Block > createBlocks(int[] data, boolean debug) {

        List< Block > blocks = new ArrayList<>();
        Block current = null;

        for (int i = 0; i < data.length; i++) {
            EncodingMode mode = chooseMode(data[i]);
            if ((current != null && current.mode == mode) &&
                (mode != EncodingMode.NUM || current.length < MAX_NUMERIC_COMPACTION_BLOCK_SIZE)) {
                current.length++;
            } else {
                current = new Block(mode);
                blocks.add(current);
            }
        }

        if (debug) {
            System.out.println("Initial block pattern: " + blocks);
        }

        smoothBlocks(blocks);

        if (debug) {
            System.out.println("Final block pattern: " + blocks);
        }

        return blocks;
    }
371478
def add_before(self):
        """"""
        idx = self._container.structure.index(self)
        return BlockBuilder(self._container, idx)