function computeChildrenBBox(shapeOrChildren, padding) {

  var elements;

  // compute based on shape
  if (shapeOrChildren.length === undefined) {

    // grab all the children that are part of the
    // parents children box
    elements = filter(shapeOrChildren.children, isBBoxChild);

  } else {
    elements = shapeOrChildren;
  }

  if (elements.length) {
    return addPadding(getBBox(elements), padding);
  }
}
Return children bounding computed from a shapes children
or a list of prefiltered children.

@param {Shape|Shape[]} shapeOrChildren
@param {RectTRBL|number} padding

@return {Rect}