function fromNodes(nodes, parent, type) {
  assert.ok(
    nodes.every(n => Node.check(n)),
    'Every element in the array should be a Node'
  );
  return fromPaths(
    nodes.map(n => new NodePath(n)),
    parent,
    type
  );
}
Creates a new collection from an array of nodes. This is a convenience
method which converts the nodes to node paths first and calls

   Collections.fromPaths(paths, parent, type)

@ignore
@param {Array} nodes An array of AST nodes
@param {Collection} parent A parent collection
@param {Type} type An AST type
@return {Collection}