Find qualified children from a single instance.
If the instance itself is qualified, just return itself.
This is ok because [].concat works in both cases.

@param {Vue|Vnode} instance
@return {Vue|Array}
492517
function findQualifiedChildren (instance) {
  return isQualified(instance)
    ? capture(instance)
    : findQualifiedChildrenFromList(instance.$children).concat(
      instance._vnode && instance._vnode.children
        // Find functional components in recursively in non-functional vnodes.
        ? flatten(instance._vnode.children.filter(child => !child.componentInstance).map(captureChild))
          // Filter qualified children.
          .filter(instance => isQualified(instance))
        : []
    )
}
617213
function (source) {
  var ast = parser.parseEval(source)
  var array = ast.children.find((child) => child.kind === 'array')
  return parseValue(array)
}
906031
function find(data) {
                if (data === this.data) {
                    return this;
                }

                if (this.children) {
                    for (var i = 0, _length = this.children.length, target = null; i < _length; i++) {
                        target = this.children[i].find(data);
                        if (target) {
                            return target;
                        }
                    }
                }

                return null;
            }
587870
function instance_mutations () {
        var _parseArguments = parseArguments$2(arguments),
            options = _parseArguments.options,
            mutations = _parseArguments.mutations;

        return Object.keys(mutations).reduce(function (instanceMutations, name) {
            instanceMutations[name] = findInstanceThen(options, mutations[name]);

            return instanceMutations;
        }, {});
    }
373070
def get_child_of(self, component, ind, kind=None):
        
        children = self.get_children_of(component, kind=kind)
        if children is None:
            return None
        else:
            return children[ind]
356436
function _getChildPrefs(prefItem) {

        var finalObj = {},
            keysFound = false;

        if (!prefItem) {
            return {};
        }

        function _populateKeys(allKeys) {

            var prop;
            if (typeof (allKeys) === "object") {
                // iterate through the list.
                keysFound = true;
                for (prop in allKeys) {
                    if (allKeys.hasOwnProperty(prop)) {
                        finalObj[prop] = allKeys[prop];
                    }
                }
            }
        }

        _populateKeys(prefItem.initial);
        _populateKeys(prefItem.keys);

        // Last resort: Maybe plain objects, in which case
        // we blindly extract all the properties.
        if (!keysFound) {
            _populateKeys(prefItem);
        }

        return finalObj;
    }
268568
function (elbName, cb) {
      query(elbName, function (err, data) {
        if (err) return cb(err);
        var result = [];
        data.Instances.map(function (item) { result.push(item.InstanceId); });
        cb(undefined, result);
      });
    }
483678
function getAllChildSpans(node) {
  return (
    Array.isArray(node.children)
      ? node.children
          .map(n => (n.spans || []).concat(getAllChildSpans(n)))
          .reduce((all, arr) => all.concat(arr))
      : []
  );
}
1268525
function getNodesByTypeHelper(childArray, type) {
  let nodes = [].concat(childArray.filter(element => element.type === type));
  let otherNodes = [];
  childArray.forEach(node => {
    if (hasChildren(node)) {
      otherNodes = otherNodes.concat(getNodesByTypeHelper(node.children, type));
    }
  });
  return nodes.concat(otherNodes);
}
3519
function(element, options) {
    return Element.findChildren(
      element, options.only, options.tree ? true : false, options.tag);
  }
794378
function _getChildren(tile) {
  if (tile[2] > z) throw new Error('input tile zoom > ' + z);
  if (tile[2] === z) return [tile];

  var children = tilebelt.getChildren(tile);
  return _getChildren(children[0])
         .concat(_getChildren(children[1]))
         .concat(_getChildren(children[2]))
         .concat(_getChildren(children[3]));
}
396079
def parse_child_instance(self, node):
        

        if 'component' in node.lattrib:
            component = node.lattrib['component']
        else:
            self.raise_error('<ChildInstance> must specify a component reference')

        self.current_structure.add_child_instance(ChildInstance(component))
744562
function getInstanceDetails (id) {
  const instance = instanceMap.get(id)
  if (!instance) {
    const vnode = findInstanceOrVnode(id)

    if (!vnode) return {}

    const data = {
      id,
      name: getComponentName(vnode.fnOptions),
      file: vnode.fnOptions.__file || null,
      state: processProps({ $options: vnode.fnOptions, ...(vnode.devtoolsMeta && vnode.devtoolsMeta.renderContext.props) }),
      functional: true
    }

    return data
  } else {
    const data = {
      id: id,
      name: getInstanceName(instance),
      state: getInstanceState(instance)
    }

    let i
    if ((i = instance.$vnode) && (i = i.componentOptions) && (i = i.Ctor) && (i = i.options)) {
      data.file = i.__file || null
    }

    return data
  }
}
653711
function find(fn) {
    if (Util.isString(fn)) {
      return this.findById(fn);
    }
    var children = this.get('children');
    var rst = null;

    Util.each(children, function (item) {
      if (fn(item)) {
        rst = item;
      } else if (item.find) {
        rst = item.find(fn);
      }
      if (rst) {
        return false;
      }
    });
    return rst;
  }
513869
def _children(self, qname:
                  Union[QualName, bool] = None) -> List["InstanceNode"]:
        """"""
        sn = self.schema_node
        if not isinstance(sn, InternalNode):
            return []
        if qname:
            cn = sn.get_data_child(*qname)
            if cn is None:
                return []
            iname = cn.iname()
            if iname in self.value:
                return self._member(iname)._node_set()
            wd = cn._default_instance(self, ContentType.all, lazy=True)
            if iname not in wd.value:
                return []
            while True:
                cn = cn.parent
                if cn is sn:
                    return wd._member(iname)._node_set()
                if (cn.when and not cn.when.evaluate(self) or
                    isinstance(cn, CaseNode) and
                        cn.qual_name != cn.parent.default_case):
                    return []
        res = []
        wd = sn._add_defaults(self, ContentType.all, lazy=True)
        for mn in wd.value:
            res.extend(wd._member(mn)._node_set())
        return res
1316082
function resolveSlots (
  children,
  context
) {
  var slots = {};
  if (!children) {
    return slots
  }
  for (var i = 0, l = children.length; i < l; i++) {
    var child = children[i];
    var data = child.data;
    // remove slot attribute if the node is resolved as a Vue slot node
    if (data && data.attrs && data.attrs.slot) {
      delete data.attrs.slot;
    }
    // named slots should only be respected if the vnode was rendered in the
    // same context.
    if ((child.context === context || child.fnContext === context) &&
      data && data.slot != null
    ) {
      var name = data.slot;
      var slot = (slots[name] || (slots[name] = []));
      if (child.tag === 'template') {
        slot.push.apply(slot, child.children || []);
      } else {
        slot.push(child);
      }
    } else {
      (slots.default || (slots.default = [])).push(child);
    }
  }
  // ignore slots that contains only whitespace
  for (var name$1 in slots) {
    if (slots[name$1].every(isWhitespace)) {
      delete slots[name$1];
    }
  }
  return slots
}
121576
function instance (data, prototype) {
    try {
      return instanceStrict(data, prototype) ||
        data.constructor.name === prototype.name ||
        Object.prototype.toString.call(data) === '[object ' + prototype.name + ']';
    } catch (error) {
      return false;
    }
  }